chemotools.plotting#

Plotting utilities for creating publication-quality visualizations of spectral data and model diagnostics. These classes follow a consistent API pattern and can be composed together for complex visualizations.

Import from this module:

from chemotools.plotting import (
    SpectraPlot,
    ScoresPlot,
    LoadingsPlot,
    DistancesPlot,
    ExplainedVariancePlot,
    FeatureSelectionPlot,
    PredictedVsActualPlot,
    YResidualsPlot,
    QQPlot,
    ResidualDistributionPlot,
)

Available Classes#

Spectral Visualization

Class

Description

SpectraPlot

Plot spectral data with categorical or continuous coloring

FeatureSelectionPlot

Visualize feature selection on spectral data

Model Diagnostics

Class

Description

ScoresPlot

Scatter plot of model scores (latent space projections)

LoadingsPlot

Line plot of model loadings (feature weights)

ExplainedVariancePlot

Bar plot of explained variance by component

DistancesPlot

Scatter plot for outlier detection (Q residuals, Hotelling’s T²)

Regression Diagnostics

Class

Description

PredictedVsActualPlot

Scatter plot of predicted vs actual values

YResidualsPlot

Plot of Y residuals for homoscedasticity analysis

QQPlot

Q-Q plot for assessing normality of residuals

ResidualDistributionPlot

Histogram of residuals with normal distribution overlay

See Also#

Plotting Methods Overview - Complete documentation with examples and visual guides