colour.plotting.plot_RGB_scatter¶
- colour.plotting.plot_RGB_scatter(RGB: ArrayLike, colourspace: Union[RGB_Colourspace, str, Sequence[Union[RGB_Colourspace, str]]], reference_colourspace: Union[Literal['CAM02LCD', 'CAM02SCD', 'CAM02UCS', 'CAM16LCD', 'CAM16SCD', 'CAM16UCS', 'CIE XYZ', 'CIE xyY', 'CIE Lab', 'CIE Luv', 'CIE UCS', 'CIE UVW', 'DIN99', 'Hunter Lab', 'Hunter Rdab', 'ICaCb', 'ICtCp', 'IPT', 'IgPgTg', 'Jzazbz', 'OSA UCS', 'Oklab', 'hdr-CIELAB', 'hdr-IPT'], str] = 'CIE xyY', colourspaces: Optional[Union[RGB_Colourspace, str, Sequence[Union[RGB_Colourspace, str]]]] = None, segments: Integer = 8, show_grid: Boolean = True, grid_segments: Integer = 10, show_spectral_locus: Boolean = False, spectral_locus_colour: Optional[Union[ArrayLike, str]] = None, points_size: Floating = 12, cmfs: Union[MultiSpectralDistributions, str, Sequence[Union[MultiSpectralDistributions, str]]] = 'CIE 1931 2 Degree Standard Observer', chromatically_adapt: Boolean = False, convert_kwargs: Optional[Dict] = None, **kwargs: Any) Tuple[plt.Figure, plt.Axes] [source]¶
Plot given RGB colourspace array in a scatter plot.
- Parameters
RGB (ArrayLike) – RGB colourspace array.
colourspace (Union[RGB_Colourspace, str, Sequence[Union[RGB_Colourspace, str]]]) – RGB colourspace of the RGB array.
colourspace
can be of any type or form supported by thecolour.plotting.filter_RGB_colourspaces()
definition.reference_colourspace (Union[Literal[('CAM02LCD', 'CAM02SCD', 'CAM02UCS', 'CAM16LCD', 'CAM16SCD', 'CAM16UCS', 'CIE XYZ', 'CIE xyY', 'CIE Lab', 'CIE Luv', 'CIE UCS', 'CIE UVW', 'DIN99', 'Hunter Lab', 'Hunter Rdab', 'ICaCb', 'ICtCp', 'IPT', 'IgPgTg', 'Jzazbz', 'OSA UCS', 'Oklab', 'hdr-CIELAB', 'hdr-IPT')], str]) – Reference colourspace model to plot the gamuts into, see
colour.COLOURSPACE_MODELS
attribute for the list of supported colourspace models.colourspaces (Optional[Union[RGB_Colourspace, str, Sequence[Union[RGB_Colourspace, str]]]]) – RGB colourspaces to plot the gamuts.
colourspaces
elements can be of any type or form supported by thecolour.plotting.filter_RGB_colourspaces()
definition.segments (Integer) – Edge segments count for each RGB colourspace cubes.
show_grid (Boolean) – Whether to show a grid at the bottom of the RGB colourspace cubes.
grid_segments (Integer) – Edge segments count for the grid.
show_spectral_locus (Boolean) – Whether to show the spectral locus.
spectral_locus_colour (Optional[Union[ArrayLike, str]]) – Spectral locus colour.
points_size (Floating) – Scatter points size.
cmfs (Union[MultiSpectralDistributions, str, Sequence[Union[MultiSpectralDistributions, str]]]) – Standard observer colour matching functions used for computing the spectral locus boundaries.
cmfs
can be of any type or form supported by thecolour.plotting.filter_cmfs()
definition.chromatically_adapt (Boolean) – Whether to chromatically adapt the RGB colourspaces given in
colourspaces
to the whitepoint of the default plotting colourspace.convert_kwargs (Optional[Dict]) – Keyword arguments for the
colour.convert()
definition.kwargs (Any) – {
colour.plotting.artist()
,colour.plotting.plot_RGB_colourspaces_gamuts()
}, 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_scatter(RGB, 'ITU-R BT.709') (<Figure size ... with 1 Axes>, <...Axes3DSubplot...>)