diff options
Diffstat (limited to 'examples/doc_builtinmodels_peakmodels.py')
-rw-r--r-- | examples/doc_builtinmodels_peakmodels.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/examples/doc_builtinmodels_peakmodels.py b/examples/doc_builtinmodels_peakmodels.py index 108ad53..0708a25 100644 --- a/examples/doc_builtinmodels_peakmodels.py +++ b/examples/doc_builtinmodels_peakmodels.py @@ -16,9 +16,9 @@ out = mod.fit(y, pars, x=x) print(out.fit_report(min_correl=0.25)) -plt.plot(x, y, 'b-') -plt.plot(x, out.best_fit, 'r-', label='Gaussian Model') -plt.legend(loc='best') +plt.plot(x, y) +plt.plot(x, out.best_fit, '-', label='Gaussian Model') +plt.legend() plt.show() @@ -30,9 +30,9 @@ out = mod.fit(y, pars, x=x) print(out.fit_report(min_correl=0.25)) plt.figure() -plt.plot(x, y, 'b-') -plt.plot(x, out.best_fit, 'r-', label='Lorentzian Model') -plt.legend(loc='best') +plt.plot(x, y, '-') +plt.plot(x, out.best_fit, '-', label='Lorentzian Model') +plt.legend() plt.show() @@ -45,16 +45,16 @@ print(out.fit_report(min_correl=0.25)) fig, axes = plt.subplots(1, 2, figsize=(12.8, 4.8)) -axes[0].plot(x, y, 'b-') -axes[0].plot(x, out.best_fit, 'r-', label='Voigt Model\ngamma constrained') -axes[0].legend(loc='best') +axes[0].plot(x, y, '-') +axes[0].plot(x, out.best_fit, '-', label='Voigt Model\ngamma constrained') +axes[0].legend() # free gamma parameter pars['gamma'].set(value=0.7, vary=True, expr='') out_gamma = mod.fit(y, pars, x=x) -axes[1].plot(x, y, 'b-') -axes[1].plot(x, out_gamma.best_fit, 'r-', label='Voigt Model\ngamma unconstrained') -axes[1].legend(loc='best') +axes[1].plot(x, y, '-') +axes[1].plot(x, out_gamma.best_fit, '-', label='Voigt Model\ngamma unconstrained') +axes[1].legend() plt.show() # <end examples/doc_builtinmodels_peakmodels.py> |