Plot Methods

plot.plot_data(title_name, xlabel: Optional[str] = None, ylabel: Optional[str] = None, xmin: Optional[float] = None, xmax: Optional[float] = None, grid: bool = False, x_log_scale: bool = False, y_log_scale: bool = False)

Plot fitting data.

Parameters:
  • data (FittingData) – Fitting data
  • title_name (str) – Optional. Title for the figure.
  • xlabel (str) – Optional. Label of the x axis
  • ylabel (str) – Optional. Label of the x axis
  • xmin (float) – Optional. Minimum value for x. if None, calculated from given data
  • xmax (float) – Optional. Maximum value for x. if None, calculated from given data
  • grid (bool) – Add grid lines or not
  • x_log_scale (bool) – Set the scale of the x axis to be logarithmic.
  • y_log_scale (bool) – Set the scale of the y axis to be logarithmic.
Returns:

matplotlib.pyplot.Figure

plot.plot_fitting(data: eddington.fitting_data.FittingData, a: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7f36c2d04150>, List[<sphinx.ext.autodoc.importer._MockObject object at 0x7f36c2d04190>], Dict[str, <sphinx.ext.autodoc.importer._MockObject object at 0x7f36c2d04490>]], title_name, xlabel: Optional[str] = None, ylabel: Optional[str] = None, grid: bool = False, legend: Optional[bool] = None, x_log_scale: bool = False, y_log_scale: bool = False, step: Optional[float] = None, xmin: Optional[float] = None, xmax: Optional[float] = None)

Plot fitting plot.

Parameters:
  • func (FittingFunction) – Fitting function.
  • data (FittingData) – Fitting data
  • a (numpy.ndarray, a list of numpy.ndarray items or a dictionary from strings to numpy.ndarray) – The parameters result
  • title_name (str) – Optional. Title for the figure.
  • xlabel (str) – Optional. Label of the x axis
  • ylabel (str) – Optional. Label of the x axis
  • grid (bool) – Add grid lines or not
  • legend (bool) – Optional. Add legend or not. If None, add legend when more than one parameters values has been presented.
  • x_log_scale (bool) – Set the scale of the x axis to be logarithmic.
  • y_log_scale (bool) – Set the scale of the y axis to be logarithmic.
  • step (float) – Optional. Steps between samples for the fitting graph
  • xmin (float) – Optional. minimum value for x in plot
  • xmax (float) – Optional. maximum value for x in plot
Returns:

matplotlib.pyplot.Figure

plot.plot_residuals(data: eddington.fitting_data.FittingData, a: <sphinx.ext.autodoc.importer._MockObject object at 0x7f36c2ceffd0>, title_name, xlabel: Optional[str] = None, ylabel: Optional[str] = None, grid: bool = False, x_log_scale: bool = False, y_log_scale: bool = False, xmin: Optional[float] = None, xmax: Optional[float] = None)

Plot residuals plot.

Parameters:
  • func (FittingFunction) – Fitting function.
  • data (FittingData) – Fitting data
  • a (numpy.ndarray or list) – The parameters result
  • title_name (str) – Optional. Title for the figure.
  • xlabel (str) – Optional. Label of the x axis
  • ylabel (str) – Optional. Label of the x axis
  • grid (bool) – Add grid lines or not
  • x_log_scale (bool) – Set the scale of the x axis to be logarithmic.
  • y_log_scale (bool) – Set the scale of the y axis to be logarithmic.
  • xmin (float) – Optional. minimum value for x in plot
  • xmax (float) – Optional. maximum value for x in plot
Returns:

matplotlib.pyplot.Figure