Iris-specific extensions to matplotlib, mimicking the matplotlib.pyplot interface.
See also: matplotlib.
In this module:
Add a text citation to a plot.
Places an anchored text citation in the bottom right hand corner of the plot.
Args:
Citation text to be plotted.
Kwargs:
Target matplotlib.figure.Figure instance. Defaults to the current figure if none provided.
Draws contour lines based on the given Cube.
Kwargs:
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.
See matplotlib.pyplot.contour() for details of other valid keyword arguments.
Draws filled contours based on the given Cube.
Kwargs:
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.
See matplotlib.pyplot.contourf() for details of other valid keyword arguments.
Return the primary map projection for the given cube.
Using the returned projection, one can create a cartopy map with:
import matplotlib.pyplot as plt
ax = plt.ax(projection=default_projection(cube))
Return the cube’s extents (x0, x1, y0, y1) in its default projection.
Keyword arguments:
- mode - Either iris.coords.POINT_MODE or iris.coords.BOUND_MODE.
Triggers whether the extent should be representative of the cell points, or the limits of the cell’s bounds. The default is iris.coords.POINT_MODE.
Plots orography defined at cell boundaries from the given Cube.
Plots orography defined at sample points from the given Cube.
Draws cell outlines based on the given Cube.
Kwargs:
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.
The color of the cell outlines. If None, the matplotlibrc setting patch.edgecolor is used by default.
The width of the lines showing the cell outlines. If None, the default width in patch.linewidth in matplotlibrc is used.
Draws a pseudocolor plot based on the given Cube.
Kwargs:
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.
See matplotlib.pyplot.pcolor() for details of other valid keyword arguments.
Draws a pseudocolor plot based on the given Cube.
Kwargs:
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.
See matplotlib.pyplot.pcolormesh() for details of other valid keyword arguments.
Draws a line plot based on the given cube(s) or coordinate(s).
The first one or two arguments may be cubes or coordinates to plot. Each of the following is valid:
# plot a 1d cube against its dimension coordinate
plot(cube)
# plot a 1d coordinate
plot(coord)
# plot a 1d cube against a given 1d coordinate, with the cube
# values on the y-axis and the coordinate on the x-axis
plot(coord, cube)
# plot a 1d cube against a given 1d coordinate, with the cube
# values on the x-axis and the coordinate on the y-axis
plot(cube, coord)
# plot two 1d coordinates against one-another
plot(coord1, coord2)
# plot two 1d cubes against one-another
plot(cube1, cube2)
See matplotlib.pyplot.plot() for details of valid keyword arguments.
Draws sample point positions based on the given Cube.
Kwargs:
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.
See matplotlib.pyplot.scatter() for details of other valid keyword arguments.
Draws a scatter plot based on the given cube(s) or coordinate(s).
Args:
See matplotlib.pyplot.scatter() for details of valid keyword arguments.
Draws fixed-size symbols.
See iris.symbols for available symbols.
Args:
The x coordinates where the symbols will be plotted.
The y coordinates where the symbols will be plotted.
The symbols (from iris.symbols) to plot.
The symbol size in units.
Kwargs:
The matplotlib.axes.Axes in which the symbols will be added. Defaults to the current axes.
The unit for the symbol size.
PlotDefn(coords, transpose)
- class iris.plot.PlotDefn(_cls, coords, transpose)¶
Bases: tuple
Create new instance of PlotDefn(coords, transpose)
- count(value) → integer -- return number of occurrences of value¶
- index(value[, start[, stop]]) → integer -- return first index of value.¶
Raises ValueError if the value is not present.
- coords¶
Alias for field number 0
- transpose¶
Alias for field number 1