Iris 0.9

Previous topic

iris.palette

Next topic

iris.proxy

This Page

iris.plot

Iris-specific extensions to matplotlib, mimicking the matplotlib.pyplot interface.

See also: matplotlib, Basemap.

In this module:


iris.plot.contour(*args, **kwargs)

Draws contour lines based on the given Cube.

Args:

  • Coords: list of coords or coordinate names

    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.


iris.plot.contourf(*args, **kwargs)

Draws filled contours based on the given Cube.

Args:

  • Coords: list of coords or coordinate names

    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.


iris.plot.gcm(cube=None)

Returns the current mpl_toolkits.basemap.Basemap, creating a new instance if necessary.


iris.plot.map_setup(cube=None, mode=None, lon_range=None, lat_range=None, **kwargs)

Defines the map for the current plot.

Kwargs:

  • cube:

    A cube whose native projection will be used to define the map projection.

  • projection:

    Name of the projection to use. Currently only ‘cyl’, Cylindrical Equidistant, is supported.

  • lon_range:

    Longitude range of the map, e.g [lon_min, lon_max].

  • lat_range:

    Latitude range of the map, e.g [lat_min, lat_max].

  • mode:

    If cube is given, and lon_range or lat_range are not provided they will be calculated automatically by looking at the appropriate points/bounds range of the lat/lon coordinates. If latitude or longitude coordinates have bounds then provide the mode keyword to determine whether to use bounds or points to calculate the latitude/longitude range. Valid values are iris.coords.POINT_MODE or iris.coords.BOUND_MODE.

Returns:
Returns a new mpl_toolkits.basemap.Basemap.

iris.plot.orography_at_bounds(cube, facecolor='#888888', coords=None)

Plots orography defined at cell boundaries from the given Cube.


iris.plot.orography_at_points(cube, facecolor='#888888', coords=None)

Plots orography defined at sample points from the given Cube.


iris.plot.outline(cube, coords=None)

Draws cell outlines based on the given Cube.

Args:

  • Coords: list of coords or coordinate names

    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.


iris.plot.pcolor(*args, **kwargs)

Draws a pseudocolor plot based on the given Cube.

Args:

  • Coords: list of coords or coordinate names

    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.


iris.plot.pcolormesh(*args, **kwargs)

Draws a pseudocolor plot based on the given Cube.

Args:

  • Coords: list of coords or coordinate names

    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.


iris.plot.plot(cube, *args, **kwargs)

Draws a line plot based on the given Cube.

Args:

  • Coords: list of coords or coordinate names

    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.plot() for details of other valid keyword arguments.


iris.plot.points(cube, *args, **kwargs)

Draws sample point positions based on the given Cube.

Args:

  • Coords: list of coords or coordinate names

    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.


iris.plot.symbols(x, y, symbols, size, axes=None, units='inches')

Draws fixed-size symbols.

See iris.symbols for available symbols.

Args:

  • x: iterable

    The x coordinates where the symbols will be plotted.

  • y: iterable

    The y coordinates where the symbols will be plotted.

  • symbols: iterable

    The symbols (from iris.symbols) to plot.

  • size: float

    The symbol size in units.

Kwargs:

  • axes:

    The matplotlib.axes.Axes in which the symbols will be added. Defaults to the current axes.

  • units: [‘inches’, ‘points’]

    The unit for the symbol size.


PlotDefn(coords, transpose)

class iris.plot.PlotDefn(_cls, coords, transpose)

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