colour.plotting.colorimetry Module¶
Colorimetry Plotting¶
Defines the colorimetry plotting objects:
single_spd_plot()
multi_spd_plot()
single_cmfs_plot()
multi_cmfs_plot()
single_illuminant_relative_spd_plot()
multi_illuminants_relative_spd_plot()
visible_spectrum_plot()
single_lightness_function_plot()
multi_lightness_function_plot()
blackbody_spectral_radiance_plot()
blackbody_colours_plot()
References
[1] | (1, 2, 3) Spiker, N. (2015). Private Discussion with Mansencal, T. Retrieved from http://www.repairfaq.org/sam/repspec/ |
-
colour.plotting.colorimetry.
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. [1]
- cmfs (unicode) – Standard observer colour matching functions used for spectrum creation.
Other Parameters: - **kwargs (dict, optional) – {
boundaries()
,canvas()
,decorate()
,display()
}, Please refer to the documentation of the previously listed definitions. - y0_plot (bool, optional) – {
colour_parameters_plot()
}, Whether to plot y0 line. - y1_plot (bool, optional) – {
colour_parameters_plot()
}, Whether to plot y1 line.
Returns: Current figure or None.
Return type: Figure
Examples
>>> from colour import SpectralPowerDistribution >>> data = {400: 0.0641, 420: 0.0645, 440: 0.0562} >>> spd = SpectralPowerDistribution('Custom', data) >>> single_spd_plot(spd)
-
colour.plotting.colorimetry.
multi_spd_plot
(spds, cmfs='CIE 1931 2 Degree Standard Observer', use_spds_colours=False, normalise_spds_colours=False, **kwargs)[source]¶ Plots given spectral power distributions.
Parameters: - spds (list) – Spectral power distributions to plot.
- cmfs (unicode, optional) – Standard observer colour matching functions used for spectrum creation.
- use_spds_colours (bool, optional) – Whether to use spectral power distributions colours.
- normalise_spds_colours (bool) – Whether to normalise spectral power distributions colours.
Other Parameters: **kwargs (dict, optional) – {
boundaries()
,canvas()
,decorate()
,display()
}, Please refer to the documentation of the previously listed definitions.Returns: Current figure or None.
Return type: Figure
Examples
>>> from colour import SpectralPowerDistribution >>> data1 = {400: 0.0641, 420: 0.0645, 440: 0.0562} >>> data2 = {400: 0.134, 420: 0.789, 440: 1.289} >>> spd1 = SpectralPowerDistribution('Custom1', data1) >>> spd2 = SpectralPowerDistribution('Custom2', data2) >>> multi_spd_plot([spd1, spd2])
-
colour.plotting.colorimetry.
single_cmfs_plot
(cmfs='CIE 1931 2 Degree Standard Observer', **kwargs)[source]¶ Plots given colour matching functions.
Parameters: cmfs (unicode, optional) – Colour matching functions to plot. Other Parameters: **kwargs (dict, optional) – { boundaries()
,canvas()
,decorate()
,display()
}, Please refer to the documentation of the previously listed definitions.Returns: Current figure or None. Return type: Figure Examples
>>> single_cmfs_plot()
-
colour.plotting.colorimetry.
multi_cmfs_plot
(cmfs=None, **kwargs)[source]¶ Plots given colour matching functions.
Parameters: cmfs (array_like, optional) – Colour matching functions to plot. Other Parameters: **kwargs (dict, optional) – { boundaries()
,canvas()
,decorate()
,display()
}, Please refer to the documentation of the previously listed definitions.Returns: Current figure or None. Return type: Figure Examples
>>> cmfs = [ ... 'CIE 1931 2 Degree Standard Observer', ... 'CIE 1964 10 Degree Standard Observer'] >>> multi_cmfs_plot(cmfs)
-
colour.plotting.colorimetry.
single_illuminant_relative_spd_plot
(illuminant='A', cmfs='CIE 1931 2 Degree Standard Observer', **kwargs)[source]¶ Plots given single illuminant relative spectral power distribution.
Parameters: - illuminant (unicode, optional) – Factory illuminant to plot.
- cmfs (unicode, optional) – Standard observer colour matching functions to plot.
Other Parameters: - **kwargs (dict, optional) – {
boundaries()
,canvas()
,decorate()
,display()
}, Please refer to the documentation of the previously listed definitions. - out_of_gamut_clipping (bool, optional) – {
single_spd_plot()
}, 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. [1]
Returns: Current figure or None.
Return type: Figure
Examples
>>> single_illuminant_relative_spd_plot()
-
colour.plotting.colorimetry.
multi_illuminants_relative_spd_plot
(illuminants=None, **kwargs)[source]¶ Plots given illuminants relative spectral power distributions.
Parameters: illuminants (array_like, optional) – Factory illuminants to plot.
Other Parameters: - **kwargs (dict, optional) – {
boundaries()
,canvas()
,decorate()
,display()
}, Please refer to the documentation of the previously listed definitions. - use_spds_colours (bool, optional) – {
multi_spd_plot()
} Whether to use spectral power distributions colours. - normalise_spds_colours (bool) – {
multi_spd_plot()
} Whether to normalise spectral power distributions colours.
Returns: Current figure or None.
Return type: Figure
Examples
>>> multi_illuminants_relative_spd_plot(['A', 'B', 'C'])
- **kwargs (dict, optional) – {
-
colour.plotting.colorimetry.
visible_spectrum_plot
(cmfs='CIE 1931 2 Degree Standard Observer', out_of_gamut_clipping=True, **kwargs)[source]¶ Plots the visible colours spectrum using given standard observer CIE XYZ colour matching functions.
Parameters: - cmfs (unicode, optional) – Standard observer colour matching functions used for spectrum creation.
- 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. [1]
Other Parameters: - **kwargs (dict, optional) – {
boundaries()
,canvas()
,decorate()
,display()
}, Please refer to the documentation of the previously listed definitions. - y0_plot (bool, optional) – {
colour_parameters_plot()
}, Whether to plot y0 line. - y1_plot (bool, optional) – {
colour_parameters_plot()
}, Whether to plot y1 line.
Returns: Current figure or None.
Return type: Figure
Examples
>>> visible_spectrum_plot()
-
colour.plotting.colorimetry.
single_lightness_function_plot
(function='CIE 1976', **kwargs)[source]¶ Plots given Lightness function.
Parameters: function (unicode, optional) – Lightness function to plot. Other Parameters: **kwargs (dict, optional) – { boundaries()
,canvas()
,decorate()
,display()
}, Please refer to the documentation of the previously listed definitions.Returns: Current figure or None. Return type: Figure Examples
>>> single_lightness_function_plot()
-
colour.plotting.colorimetry.
multi_lightness_function_plot
(functions=None, **kwargs)[source]¶ Plots given Lightness functions.
Parameters: functions (array_like, optional) – Lightness functions to plot. Other Parameters: **kwargs (dict, optional) – { boundaries()
,canvas()
,decorate()
,display()
}, Please refer to the documentation of the previously listed definitions.Returns: Current figure or None. Return type: Figure Raises: KeyError
– If one of the given Lightness function is not found in the factory Lightness functions.Examples
>>> fs = ('CIE 1976', 'Wyszecki 1963') >>> multi_lightness_function_plot(fs)
-
colour.plotting.colorimetry.
blackbody_spectral_radiance_plot
(temperature=3500, cmfs='CIE 1931 2 Degree Standard Observer', blackbody='VY Canis Major', **kwargs)[source]¶ Plots given blackbody spectral radiance.
Parameters: - temperature (numeric, optional) – Blackbody temperature.
- cmfs (unicode, optional) – Standard observer colour matching functions.
- blackbody (unicode, optional) – Blackbody name.
Other Parameters: **kwargs (dict, optional) – {
boundaries()
,canvas()
,decorate()
,display()
}, Please refer to the documentation of the previously listed definitions.Returns: Current figure or None.
Return type: Figure
Examples
>>> blackbody_spectral_radiance_plot()
-
colour.plotting.colorimetry.
blackbody_colours_plot
(shape=SpectralShape(150.0, 12500.0, 50.0), cmfs='CIE 1931 2 Degree Standard Observer', **kwargs)[source]¶ Plots blackbody colours.
Parameters: - shape (SpectralShape, optional) – Spectral shape to use as plot boundaries.
- cmfs (unicode, optional) – Standard observer colour matching functions.
Other Parameters: - **kwargs (dict, optional) – {
boundaries()
,canvas()
,decorate()
,display()
}, Please refer to the documentation of the previously listed definitions. - y0_plot (bool, optional) – {
colour_parameters_plot()
}, Whether to plot y0 line. - y1_plot (bool, optional) – {
colour_parameters_plot()
}, Whether to plot y1 line.
Returns: Current figure or None.
Return type: Figure
Examples
>>> blackbody_colours_plot()