spectrochempy.plot_parityο
- plot_parity(Y, Y_hat, *, ax=None, clear=True, show=True, s=None, c=None, marker=None, cmap=None, norm=None, vmin=None, vmax=None, alpha=0.5, linewidths=None, edgecolors=None, plotnonfinite=False, data=None, **kwargs)[source]ο
Plot predicted vs measured values (parity plot).
Creates a scatter plot of
Y_hat(predicted) vsY(measured) with a diagonal reference line (y = x).- Parameters:
Y (
NDDataset) β Measured values.Y_hat (
NDDataset) β Predicted values.ax (
Axes, optional) β Axes to plot on. If None, a new figure is created.clear (
bool, optional) β Whether to clear the axes before plotting. Default: True. Only used whenaxis provided.show (
bool, optional) β Whether to display the figure. Default: True.s (
floator array-like, optional) β Marker size in points**2.c (array-like or list of colors, optional) β Marker colors.
marker (
str, optional) β Marker style.cmap (
strorColormap, optional) β Colormap for scalar data mapping.norm (
strorNormalize, optional) β Normalization method for scalar data.vmin, vmax (
float, optional) β Data range for colormap.alpha (
float, optional) β Alpha blending value. Default: 0.5.linewidths (
floator array-like, optional) β Linewidth of marker edges.edgecolors (color or sequence of colors, optional) β Edge color of markers.
plotnonfinite (
bool, optional) β Whether to plot nonfinite data. Default: False.data (optional) β Unused parameter for compatibility.
**kwargs β Additional keyword arguments passed to
scatter.
- Returns:
Axesβ The matplotlib axes containing the plot.
See also
parityplotDeprecated alias for this function.