PseudoNetCDF.plotutil package
Submodules
PseudoNetCDF.plotutil.colors module
- PseudoNetCDF.plotutil.colors.get_cmap(name=None, lut=None)[source]
[Deprecated] Get a colormap instance, defaulting to rc values if name is None.
- Parameters:
name (~matplotlib.colors.Colormap or str or None, default: None) – If a .Colormap instance, it will be returned. Otherwise, the name of a colormap known to Matplotlib, which will be resampled by lut. The default, None, means :rc:`image.cmap`.
lut (int or None, default: None) – If name is not already a Colormap instance and lut is not None, the colormap will be resampled to have lut entries in the lookup table.
- Return type:
Colormap
Notes
Deprecated since version 3.7: Use
matplotlib.colormaps[name]
ormatplotlib.colormaps.get_cmap()
orpyplot.get_cmap()
instead.
- PseudoNetCDF.plotutil.colors.register(cmap, *, name=None, force=False)
Register a new colormap.
The colormap name can then be used as a string argument to any
cmap
parameter in Matplotlib. It is also available inpyplot.get_cmap
.The colormap registry stores a copy of the given colormap, so that future changes to the original colormap instance do not affect the registered colormap. Think of this as the registry taking a snapshot of the colormap at registration.
- Parameters:
cmap (matplotlib.colors.Colormap) – The colormap to register.
name (str, optional) – The name for the colormap. If not given,
cmap.name
is used.force (bool, default: False) – If False, a ValueError is raised if trying to overwrite an already registered name. True supports overwriting registered colormaps other than the builtin colormaps.
PseudoNetCDF.plotutil.pnc2d module
PseudoNetCDF.plotutil.pncmap module
PseudoNetCDF.plotutil.pncscatter module
PseudoNetCDF.plotutil.pncts module
PseudoNetCDF.plotutil.vertprofile module
Module contents
- PseudoNetCDF.plotutil.SegmentedLogNorm(vmin, vmax, bins=10, ncolors=256, full_levels=False)[source]
Create BoundaryNorm with (N=bins) log spacing. If full_levels, then colorbar will start on a full log level and end on a full log level.
boundaries = np.logspace(np.log10(vmin), np.log10(vmax), bins + 1) return BoundaryNorm(boundaries, ncolors)
- PseudoNetCDF.plotutil.plotscatter(args)