Navigation
Module FitPlotter | Source |
---|
module contains 2 methods to plot the results of a fit by a Fitter resp. mpler.
are invoked when Fitter.fit() or Sampler.sample() is called with plot=True.
plotFit( data=None, yfit=None, model=None, fitter=None, show=True, residuals=False, xlabel=None, ylabel=None, title=None, figsize=[7,5], xlim=None, ylim=None, filename=None, transparent=False ) |
---|
Plot the data of a fit.
Parameters
- x : array_like
xdata of the problem - data : array_like
ydata of the problem - yfit : array_like
fit of the data to the model - model : Model
the model the data are fitted to at x - fitter : BaseFitter
the fitter being used
If set it displays a confidence region for the fit - show : bool
display the plot - residuals : bool
plot the residuals in a separate panel - xlabel : None or str
use as xlabel - ylabel : None or str
use as ylabel - title : None or str
use as title - xlim : None or list of 2 floats
limits on x-axis - ylim : None or list of 2 floats
limits on y-axis - figsize : list of 2 floats
size of the figure - filename : None or str
name of png file; otherwise show - transparent : bool
make the png file transparent
plotSampleList( xdata, ydata, errors=None, npt=10000, residuals=False, xlabel=None, ylabel=None, title=None, figsize=[7,5], xlim=None, ylim=None, filename=None, transparent=False, show=True ) |
---|
Parameters
- sl : SampleList
the samplelist containing samples from the posterior - xdata : arraylike
the xdata values; plotted for comparison - ydata : arraylike
the ydata values; plotted for comparison - errors : None of arraylike
(No) errors on the ydata are displayed - npt : int
number of points from the sample (10000) - residuals : bool
plot the residuals in a lower panel (False) - xlabel : None or str
use as xlabel - ylabel : None or str
use as ylabel - title : None or str
use as title - xlim : None or list of 2 floats
limits on x-axis - ylim : None or list of 2 floats
limits on y-axis - figsize : list of 2 floats
size of the figure - filename : None or str
name of png file; otherwise show - transparent : bool
make the png file transparent