colorimetry.plotting#

Colorimetry plotting utilities.

Functions

plot_cie_1931_chromaticity_diagram([ax, ...])

Plots the CIE 1931 chromaticity diagram (spectral locus).

plot_cie_1931_chromaticity_diagram(ax: plt.Axes | None = None, title: str = 'CIE 1931 Chromaticity Diagram', color: Literal['no', 'contour', 'fill'] = 'contour', show_legend: bool = False) tuple[plt.Figure, plt.Axes][source]#

Plots the CIE 1931 chromaticity diagram (spectral locus).

Generates the spectral locus by converting the standard observer CMFs to xy coordinates for each wavelength.

Parameters:
  • ax – Optional matplotlib Axes. If None, a new figure is created.

  • title – Title of the plot.

  • color – Coloring mode. - “no”: Black and white outline. - “contour”: Spectral locus colored by wavelength (default). - “fill”: Gamut filled with approximate sRGB colors.

  • show_legend – Whether to display the legend.

Returns:

Tuple (Figure, Axes).