xray.plot.contour¶
- xray.plot.contour(darray, ax=None, xincrease=None, yincrease=None, add_colorbar=True, add_labels=True, vmin=None, vmax=None, cmap=None, center=None, robust=False, extend=None, levels=None, **kwargs)¶
Contour plot of 2d DataArray
Wraps matplotlib.pyplot.contour
Parameters: darray : DataArray
must be 2 dimensional.
ax : matplotlib axes object, optional
If None, uses the current axis
xincrease : None, True, or False, optional
Should the values on the x axes be increasing from left to right? if None, use the default for the matplotlib function
yincrease : None, True, or False, optional
Should the values on the y axes be increasing from top to bottom? if None, use the default for the matplotlib function
add_colorbar : Boolean, optional
Adds colorbar to axis
add_labels : Boolean, optional
Use xray metadata to label axes
vmin, vmax : floats, optional
Values to anchor the colormap, otherwise they are inferred from the data and other keyword arguments. When a diverging dataset is inferred, one of these values may be ignored. If discrete levels are provided as an explicit list, both of these values are ignored.
cmap : matplotlib colormap name or object, optional
The mapping from data values to color space. If not provided, this will be either be viridis (if the function infers a sequential dataset) or RdBu_r (if the function infers a diverging dataset). When levels is provided and when Seaborn is installed, cmap may also be a seaborn color palette or a list of colors.
center : float, optional
The value at which to center the colormap. Passing this value implies use of a diverging colormap.
robust : bool, optional
If True and vmin or vmax are absent, the colormap range is computed with robust quantiles instead of the extreme values.
extend : {‘neither’, ‘both’, ‘min’, ‘max’}, optional
How to draw arrows extending the colorbar beyond its limits. If not provided, extend is inferred from vmin, vmax and the data limits.
levels : int or list-like object, optional
Split the colormap (cmap) into discrete color intervals.
**kwargs : optional
Additional arguments to wrapped matplotlib function
Returns: artist :
The same type of primitive artist that the wrapped matplotlib function returns