iris.quickplot#

High-level plotting extensions to iris.plot.

These routines work much like their iris.plot counterparts, but they automatically add a plot title, axis titles, and a colour bar when appropriate.

These also have the optional kwarg footer, which adds text to the bottom right of the plot figure. For UK government security classifications, the enum Classification can be used for common usages.

See also: matplotlib.

class iris.quickplot.Classification(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Bases: StrEnum

Holds common UK security classifications, for convenience and consistency whilst using footer.

See government documentation.

__dir__()#

Returns public methods and other interesting attributes.

__new_member__(*values)#

values must already be of type str

official = 'Official'#
official_sensitive = 'Official-Sensitive'#
secret = 'Secret'#
top_secret = 'Top Secret'#
iris.quickplot.contour(cube, *args, **kwargs)[source]#

Draw contour lines on a labelled plot based on the given Cube.

With the basic call signature, contour “level” values are chosen automatically:

contour(cube)

Supply a number to use N automatically chosen levels:

contour(cube, N)

Supply a sequence V to use explicitly defined levels:

contour(cube, V)

See iris.plot.contour() for details of valid keyword arguments.

Notes

This function does not maintain laziness when called; it realises data. See more at Real and Lazy Data.

iris.quickplot.contourf(cube, *args, **kwargs)[source]#

Draw filled contours on a labelled plot based on the given Cube.

With the basic call signature, contour “level” values are chosen automatically:

contour(cube)

Supply a number to use N automatically chosen levels:

contour(cube, N)

Supply a sequence V to use explicitly defined levels:

contour(cube, V)

Keywords#

colorbarbool, default=True

If True, an appropriate colorbar will be added to the plot.

See iris.plot.contourf() for details of valid keyword arguments.

Notes

This function does not maintain laziness when called; it realises data. See more at Real and Lazy Data.

iris.quickplot.fill_between(x, y1, y2, *args, **kwargs)[source]#

Draw a labelled fill_between plot based on the given cubes or coordinates.

See iris.plot.fill_between() for details of valid arguments and keyword arguments.

Notes

This function does not maintain laziness when called; it realises data. See more at Real and Lazy Data.

iris.quickplot.hist(x, *args, **kwargs)[source]#

Compute and plot a labelled histogram.

See iris.plot.hist() for details of valid arguments and keyword arguments.

Notes

This function does not maintain laziness when called; it realises data. See more at Real and Lazy Data.

iris.quickplot.outline(cube, coords=None, color='k', linewidth=None, axes=None, footer=None)[source]#

Draw cell outlines on a labelled plot based on the given Cube.

Parameters:
  • coords (list of Coord objects or coordinate names, optional) – Use the given coordinates as the axes for the plot. The order of the given coordinates indicates which axis to use for each, where the first element is the horizontal axis of the plot and the second element is the vertical axis of the plot.

  • color (str, default="k") – The color of the cell outlines. If None, the matplotlibrc setting patch.edgecolor is used by default.

  • linewidth (number, optional) – The width of the lines showing the cell outlines. If None, the default width in patch.linewidth in matplotlibrc is used.

Notes

This function does not maintain laziness when called; it realises data. See more at Real and Lazy Data.

iris.quickplot.pcolor(cube, *args, **kwargs)[source]#

Draw a labelled pseudocolor plot based on the given Cube.

Keywords#

colorbarbool, default=True

If True, an appropriate colorbar will be added to the plot.

See iris.plot.pcolor() for details of valid keyword arguments.

Notes

This function does not maintain laziness when called; it realises data. See more at Real and Lazy Data.

iris.quickplot.pcolormesh(cube, *args, **kwargs)[source]#

Draw a labelled pseudocolour plot based on the given Cube.

Keywords#

colorbarbool, default=True

If True, an appropriate colorbar will be added to the plot.

See iris.plot.pcolormesh() for details of valid keyword arguments.

Notes

This function does not maintain laziness when called; it realises data. See more at Real and Lazy Data.

iris.quickplot.plot(*args, **kwargs)[source]#

Draw a labelled line plot based on the given cube(s) or coordinate(s).

See iris.plot.plot() for details of valid arguments and keyword arguments.

Notes

This function does not maintain laziness when called; it realises data. See more at Real and Lazy Data.

iris.quickplot.points(cube, *args, **kwargs)[source]#

Draw sample point positions on a labelled plot based on the given Cube.

See iris.plot.points() for details of valid keyword arguments.

Notes

This function does not maintain laziness when called; it realises data. See more at Real and Lazy Data.

iris.quickplot.scatter(x, y, *args, **kwargs)[source]#

Draw a labelled scatter plot based on the given cubes or coordinates.

See iris.plot.scatter() for details of valid arguments and keyword arguments.

Notes

This function does not maintain laziness when called; it realises data. See more at Real and Lazy Data.