diff --git a/pyzebra/app/panel_ccl_integrate.py b/pyzebra/app/panel_ccl_integrate.py index 1b8d0be..a29c26e 100644 --- a/pyzebra/app/panel_ccl_integrate.py +++ b/pyzebra/app/panel_ccl_integrate.py @@ -187,12 +187,13 @@ def create(): fit = scan.get("fit") if fit is not None: - plot_fit_source.data.update(x=x, y=fit.best_fit) + x_fit = np.linspace(x[0], x[-1], 100) + plot_fit_source.data.update(x=x_fit, y=fit.eval(x=x_fit)) for i, model in enumerate(fit_params): if "background" in model: - comps = fit.eval_components() - plot_bkg_source.data.update(x=x, y=comps[f"f{i}_"]) + comps = fit.eval_components(x=x_fit) + plot_bkg_source.data.update(x=x_fit, y=comps[f"f{i}_"]) break else: plot_bkg_source.data.update(x=[], y=[]) diff --git a/pyzebra/app/panel_param_study.py b/pyzebra/app/panel_param_study.py index e99ae30..29040aa 100644 --- a/pyzebra/app/panel_param_study.py +++ b/pyzebra/app/panel_param_study.py @@ -205,12 +205,13 @@ def create(): fit = scan.get("fit") if fit is not None: - plot_fit_source.data.update(x=x, y=fit.best_fit) + x_fit = np.linspace(x[0], x[-1], 100) + plot_fit_source.data.update(x=x_fit, y=fit.eval(x=x_fit)) for i, model in enumerate(fit_params): if "background" in model: - comps = fit.eval_components() - plot_bkg_source.data.update(x=x, y=comps[f"f{i}_"]) + comps = fit.eval_components(x=x_fit) + plot_bkg_source.data.update(x=x_fit, y=comps[f"f{i}_"]) break else: plot_bkg_source.data.update(x=[], y=[])