colour.plotting.plot_image¶
- colour.plotting.plot_image(image: ArrayLike, imshow_kwargs: Optional[Dict] = None, text_kwargs: Optional[Dict] = None, **kwargs: Any) Tuple[matplotlib.figure.Figure, matplotlib.axes._axes.Axes] [source]¶
Plot given image.
- Parameters
image (ArrayLike) – Image to plot.
imshow_kwargs (Optional[Dict]) – Keyword arguments for the
matplotlib.pyplot.imshow()
definition.text_kwargs (Optional[Dict]) –
Keyword arguments for the
matplotlib.pyplot.text()
definition. The following special keyword arguments can also be used:offset
: Sets the text offset.
kwargs (Any) – {
colour.plotting.artist()
,colour.plotting.render()
}, See the documentation of the previously listed definitions.
- Returns
Current figure and axes.
- Return type
Examples
>>> import os >>> import colour >>> from colour import read_image >>> path = os.path.join( ... colour.__path__[0], 'examples', 'plotting', 'resources', ... 'Ishihara_Colour_Blindness_Test_Plate_3.png') >>> plot_image(read_image(path)) (<Figure size ... with 1 Axes>, <...AxesSubplot...>)