colour.plotting.models.plot_RGB_chromaticities_in_chromaticity_diagram#
- colour.plotting.models.plot_RGB_chromaticities_in_chromaticity_diagram(RGB: ArrayLike, colourspace: colour.models.rgb.rgb_colourspace.RGB_Colourspace | str | collections.abc.Sequence[colour.models.rgb.rgb_colourspace.RGB_Colourspace | str] = 'sRGB', chromaticity_diagram_callable: Callable = plot_RGB_colourspaces_in_chromaticity_diagram, method: Union[Literal['CIE 1931', 'CIE 1960 UCS', 'CIE 1976 UCS'], str] = 'CIE 1931', scatter_kwargs: dict | None = None, **kwargs: Any) Tuple[matplotlib.figure.Figure, matplotlib.axes._axes.Axes] [source]#
Plot given RGB colourspace array in the Chromaticity Diagram according to given method.
- Parameters
RGB (ArrayLike) – RGB colourspace array.
colourspace (colour.models.rgb.rgb_colourspace.RGB_Colourspace | str | collections.abc.Sequence[colour.models.rgb.rgb_colourspace.RGB_Colourspace | str]) – RGB colourspace of the RGB array.
colourspace
can be of any type or form supported by thecolour.plotting.common.filter_RGB_colourspaces()
definition.chromaticity_diagram_callable (Callable) – Callable responsible for drawing the Chromaticity Diagram.
method (Union[Literal['CIE 1931', 'CIE 1960 UCS', 'CIE 1976 UCS'], str]) – Chromaticity Diagram method.
scatter_kwargs (dict | None) –
Keyword arguments for the
matplotlib.pyplot.scatter()
definition. The following special keyword arguments can also be used:c
: Ifc
is set to RGB, the scatter will use the colours as given by theRGB
argument.apply_cctf_encoding
: Ifapply_cctf_encoding
is set to False, the encoding colour component transfer function / opto-electronic transfer function is not applied when encoding the samples to the plotting space.
kwargs (Any) – {
colour.plotting.artist()
,colour.plotting.diagrams.plot_chromaticity_diagram()
,colour.plotting.models.plot_RGB_colourspaces_in_chromaticity_diagram()
,colour.plotting.render()
}, See the documentation of the previously listed definitions.
- Returns
Current figure and axes.
- Return type
Examples
>>> RGB = np.random.random((128, 128, 3)) >>> plot_RGB_chromaticities_in_chromaticity_diagram(RGB, "ITU-R BT.709") ... (<Figure size ... with 1 Axes>, <...Axes...>)