oceanspy.plot.horizontal_section

oceanspy.plot.horizontal_section(od, varName, plotType='pcolormesh', use_coords=True, contourName=None, meanAxes=False, intAxes=False, contour_kwargs=None, clabel_kwargs=None, cutout_kwargs=None, **kwargs)[source]

Plot horizontal section.

Parameters
od: OceanDataset

oceandataset used to plot.

varName: str, None

Name of the variable to plot.

plotType: str

2D plot type. Options: {‘contourf’, ‘contour’, ‘imshow’, ‘pcolormesh’}

use_coords: bool

If True, use coordinates for x and y axis (e.g., XC and YC). If False, use dimensions for x and y axis (e.g., X and Y)

contourName: str, None

Name of the variable to contour on top.

meanAxes: 1D array_like, str, or bool

List of axes over which to apply oceanspy.compute.weighted_mean(). If True, set meanAxes= oceanspy.OceanDataset.grid_coords. If False, skip weighted mean.

intAxes: 1D array_like, str, or bool

List of axes over which to apply oceanspy.compute.integral(). If True, set intAxes= oceanspy.OceanDataset.grid_coords. If False, skip integral.

contour_kwargs: dict

Keyword arguments for xarray.plot.contour()

clabel_kwargs: dict

Keyword arguments for matplotlib.pyplot.clabel()

cutout_kwargs: dict

Keyword arguments for oceanspy.subsample.cutout()

**kwargs:

Kewyword arguments for xarray.plot.plotType

Returns
matplotlib.pyplot.axes or xarray.plot.FacetGrid

References

http://xarray.pydata.org/en/stable/plotting.html