colour.plotting.plot_image#
- colour.plotting.plot_image(image: ArrayLike, imshow_kwargs: dict | None = None, text_kwargs: dict | None = None, **kwargs: Any) Tuple[Figure, Axes] [source]#
Plot given image.
- Parameters:
image (ArrayLike) – Image to plot.
imshow_kwargs (dict | None) – Keyword arguments for the
matplotlib.pyplot.imshow()
definition.text_kwargs (dict | None) –
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>, <...Axes...>)