oceanspy.plot.TS_diagram
- oceanspy.plot.TS_diagram(od, Tlim=None, Slim=None, dens=None, meanAxes=None, colorName=None, plotFreez=True, ax=None, cmap_kwargs=None, contour_kwargs=None, clabel_kwargs=None, cutout_kwargs=None, **kwargs)[source]
Plot temperature-salinity diagram.
- Parameters:
- od: OceanDataset
oceandataset used to plot.
- Tlim: array_like with 2 elements
Temperature limits on the y axis. If None, uses min and max values.
- Slim: array_like with 2 elements
Salinity limits on the x axis. If None, uses min and max values.
- dens: xarray.DataArray
DataArray with densities used for isopycnals. Must have coordinates (Temp, S). In None, dens is inferred from Temp and S.
- meanAxes: 1D array_like, str, or None
List of axes over which to apply weighted mean. If None, don’t average.
- colorName: str, None
Name of the variable to use to color (e.g., Temp). If None, uses plot insted of scatter (much faster)
- plotFreez: bool
If True, plot freezing line in blue.
- ax: matplotlib.pyplot.axes
If None, uses the current axis.
- cmap_kwargs: dict
Keyword arguments for the colormap (same used by xarray)
- contour_kwargs: dict
Keyword arguments for
matplotlib.pytplot.contour()
(isopycnals)- clabel_kwargs: dict
Keyword arguments for
matplotlib.pytplot.clabel()
(isopycnals)- cutout_kwargs: dict
Keyword arguments for
oceanspy.subsample.cutout()
- **kwargs:
If colorName is None: Kewyword arguments for
matplotlib.pytplot.plot()
Otherwise, kewyword arguments formatplotlib.pytplot.scatter()
- Returns:
- ax: matplotlib.pyplot.axes
Axes object.
See also
References
http://xarray.pydata.org/en/stable/plotting.html#introduction