Hodograph#

class metpy.plots.Hodograph(ax=None, component_range=80)[source]#

Make a hodograph of wind data.

Plots the u and v components of the wind along the x and y axes, respectively.

This class simplifies the process of creating a hodograph using matplotlib. It provides helpers for creating a circular grid and for plotting the wind as a line colored by another value (such as wind speed).

ax#

The underlying Axes instance used for all plotting

Type:

matplotlib.axes.Axes

Create a Hodograph instance.

Parameters:
  • ax (matplotlib.axes.Axes, optional) – The Axes instance used for plotting

  • component_range (int) – The maximum range of the plot. Used to set plot bounds and control the maximum number of grid rings needed.

Methods Summary

__init__([ax, component_range])

Create a Hodograph instance.

add_grid([increment])

Add grid lines to hodograph.

plot(u, v, **kwargs)

Plot u, v data.

plot_colormapped(u, v, c[, intervals, colors])

Plot u, v data, with line colored based on a third set of data.

wind_vectors(u, v, **kwargs)

Plot u, v data as wind vectors.

Methods Documentation

__init__(ax=None, component_range=80)[source]#

Create a Hodograph instance.

Parameters:
  • ax (matplotlib.axes.Axes, optional) – The Axes instance used for plotting

  • component_range (int) – The maximum range of the plot. Used to set plot bounds and control the maximum number of grid rings needed.

add_grid(increment=10.0, **kwargs)[source]#

Add grid lines to hodograph.

Creates lines for the x- and y-axes, as well as circles denoting wind speed values.

Parameters:
  • increment (int, optional) – The value increment between rings

  • kwargs – Other kwargs to control appearance of lines

plot(u, v, **kwargs)[source]#

Plot u, v data.

Plots the wind data on the hodograph.

Parameters:
  • u (array-like) – u-component of wind

  • v (array-like) – v-component of wind

  • kwargs – Other keyword arguments to pass to matplotlib.axes.Axes.plot()

Returns:

list[matplotlib.lines.Line2D] – lines plotted

plot_colormapped(u, v, c, intervals=None, colors=None, **kwargs)[source]#

Plot u, v data, with line colored based on a third set of data.

Plots the wind data on the hodograph, but with a colormapped line. Takes a third variable besides the winds (e.g. heights or pressure levels) and either a colormap to color it with or a series of contour intervals and colors to create a colormap and norm to control colormapping. The intervals must always be in increasing order.

When c and intervals are height data (pint.Quantity objects with units of length, such as ‘m’ or ‘km’), the function will automatically interpolate to the contour intervals from the height and wind data, as well as convert the input contour intervals from height AGL to MSL to work with the provided heights.

Parameters:
  • u (array-like) – u-component of wind

  • v (array-like) – v-component of wind

  • c (array-like) – data to use for colormapping (e.g. heights, pressure, wind speed)

  • intervals (array-like, optional) – Array of intervals for c to use in coloring the hodograph.

  • colors (list, optional) – Array of strings representing colors for the hodograph segments.

  • kwargs – Other keyword arguments to pass to matplotlib.collections.LineCollection

Returns:

matplotlib.collections.LineCollection – instance created

See also

Hodograph.plot()

wind_vectors(u, v, **kwargs)[source]#

Plot u, v data as wind vectors.

Plot the wind data as vectors for each level, beginning at the origin.

Parameters:
  • u (array-like) – u-component of wind

  • v (array-like) – v-component of wind

  • kwargs – Other keyword arguments to pass to matplotlib.axes.Axes.quiver()

Returns:

matplotlib.quiver.Quiver – arrows plotted

Examples using metpy.plots.Hodograph#

Advanced Sounding Plot with Complex Layout

Advanced Sounding Plot with Complex Layout

Skew-T with Complex Layout

Skew-T with Complex Layout

Hodograph Inset

Hodograph Inset

Upper Air Sounding Tutorial

Upper Air Sounding Tutorial