colour.plotting.single_spd_plot

colour.plotting.single_spd_plot(spd, cmfs='CIE 1931 2 Degree Standard Observer', out_of_gamut_clipping=True, **kwargs)[source]

Plots given spectral power distribution.

Parameters:
  • spd (SpectralPowerDistribution) – Spectral power distribution to plot.
  • out_of_gamut_clipping (bool, optional) – Whether to clip out of gamut colours otherwise, the colours will be offset by the absolute minimal colour leading to a rendering on gray background, less saturated and smoother.
  • cmfs (unicode) – Standard observer colour matching functions used for spectrum creation.
Other Parameters:
 

**kwargs (dict, optional) – {colour.plotting.render()}, Please refer to the documentation of the previously listed definition.

Returns:

Current figure or None.

Return type:

Figure

References

Examples

>>> from colour import SpectralPowerDistribution
>>> data = {
...     500: 0.0651,
...     520: 0.0705,
...     540: 0.0772,
...     560: 0.0870,
...     580: 0.1128,
...     600: 0.1360
... }
>>> spd = SpectralPowerDistribution(data, name='Custom')
>>> single_spd_plot(spd)