nctoolkit.DataSet.pub_plot#
- DataSet.pub_plot(var=None, extent=None, title=None, legend=None, size='auto', land='auto', colours='auto', norm=None, limits=None, projection='auto', coast='auto', scale='auto', grid=True, grid_colour='auto', legend_position='auto', robust=False, out=None, breaks=None, dpi='figure', font=None, **kwargs)#
pub_plot: Static plotting. This requires datasets to have regular latlon grids.
Plots a static map, and requires only one variable, time step and vertical level
- Parameters:
ds (nctoolkit dataset) – Dataset to plot
var (str) – Variable to plot
extent (list) – List with [lon_min, lon_max, lat_min, lat_max] for plotting extent
title (str) – Character string with plot title
legend (str) – Character string with legend title
size (list) – List with [xsize, ysize] for plotting size
land (str) – Character string with colour required for land. Set to None if you do not want land to show.
colours (str) – Character string with colour map to use. Set to None if you do not want to use a colour map.
norm (str or matplotlib.colors norm) – Norm to use for colour bar
limits (list) – List with [min, max] for colour bar limits. Please note that if the colour scale passes through zero, the colour scale will be symmetrical around zero. So the limits will be reset to the maximum absolute value of the data.
projection (cartopy projection) – Cartopy projection to use.
coast (str) – Set to “coarse”, “low”, “intermediate”, “high” or “full” if you want to use GSHHS coastlines
scale (str) – “low”, “medium” or “high”
grid (bool) – Set to False if you do not want grid lines.
"auto" (legend_position =)
robust (bool) – Whether to use robust statistics for the colour scale or not
out (str) – Output file name
breaks (list) – List of breaks for the colour bar
dpi (int) – DPI for output file. Default is “figure”.
- *kwargs:
kwargs to allow slight misspelling of arguments