fitbenchmarking.results_processing.plots module

Higher level functions that are used for plotting the fit plot and a starting guess plot.

class fitbenchmarking.results_processing.plots.Plot(best_result, options, figures_dir)

Bases: object

Class providing plotting functionality.

format_plot()

Performs post plot processing to annotate the plot correctly

plot_best(minimizer, params)

Plots the fit along with the data using the “best_fit” style and saves to a file

Parameters:
  • minimizer (str) – name of the best fit minimizer
  • params (list) – fit parameters returned from the best fit minimizer
Returns:

path to the saved file

Return type:

str

plot_data(errors, plot_options, x=None, y=None)

Plots the data given

Parameters:
  • errors (bool) – whether fit minimizer uses errors
  • plot_options (dict) – Values for style of the data to plot, for example color and zorder
  • x (np.array) – x values to be plotted
  • y (np.array) – y values to be plotted
plot_fit(minimizer, params)

Updates self.line to show the fit using the passed in params. If self.line is empty it will create a new line. Stores the plot in a file

Parameters:
  • minimizer (str) – name of the fit minimizer
  • params (list) – fit parameters returned from the best fit minimizer
Returns:

path to the saved file

Return type:

str

plot_initial_guess()

Plots the initial guess along with the data and stores in a file

Returns:path to the saved file
Return type:str