pcolormesh_new
- mdtools.plot.pcolormesh_new(*args, ax, cbar=True, cax=None, **kwargs)[source]
Plot two dimensional data as colormap with
matplotlib.axes.Axes.pcolormesh()
.See
matplotlib.axes.Axes.pcolormesh()
andmatplotlib.pyplot.colorbar()
for more details.- Parameters:
args (
iterable
, optional) – Positional arguments to parse tomatplotlib.axes.Axes.pcolormesh()
.ax (
matplotlib.axes.Axes
) – Thematplotlib.axes.Axes
to which to draw the pcolormesh.cbar (
bool
, optional) – IfTrue
, create a colorbar and plot it either in thematplotlib.axes.Axes
given by ax or cax.cax (
matplotlib.axes.Axes
, optional) – If given, the colorbar is placed in thismatplotlib.axes.Axes
. Is ignored if cbar isFalse
.kwargs (
dict
, optional) – Keyword arguments to parse tomatplotlib.axes.Axes.pcolormesh()
.
- Returns:
pcm (
matplotlib.collections.QuadMesh
) – The pcolormesh.cbar (
matplotlib.colorbar.Colorbar
) – The colorbar. Only created and returned if cbar isTrue
.
Notes
The following defaults of
matplotlib.axes.Axes.pcolormesh()
are changed:edgecolors is set to
'none'
.rasterized is set to
True
.
In contrast to the default MDTools plotting style, the axis ticks are drawn outside of the plot.