scatter_with_regression_figure#
- petpal.utils.testing_utils.scatter_with_regression_figure(axes, fit_values: numpy.ndarray, true_values: numpy.ndarray, ax_titles: list[str], sca_kwargs: dict = None, reg_kwargs: dict = None)#
Generates a scatter plot with regression for the specified axes, fitted and true values.
The function is intended to be used to generate multiple sets of figures for comparing multiple fit parameters. The format of the values is
values=[[first_param, second_param, ...], [first_param, second_param, ...], ..].- Parameters:
axes (list[matplotlib.axes]) – The axes on which to generate the scatter plot.
fit_values (np.ndarray) – The fitted values to plot.
true_values (np.ndarray) – The true values to plot.
ax_titles (list[str]) – Titles of the axes.
sca_kwargs (dict, optional) – Additional keyword arguments for the scatter plot. Defaults to red dots.
reg_kwargs (dict, optional) – Additional keyword arguments for the regression line. Defaults to a black, solid line.
Note
Uses
scipy.stats.linregress()for linear regression.