pcolormesh
- mdtools.plot.pcolormesh(ax, x, y, z, cax=None, xmin=None, xmax=None, ymin=None, ymax=None, xlabel='$x$', ylabel='$y$', cbarlabel='$z$', **kwargs)[source]
Plot two dimensional data as heatmap with
matplotlib.axes.Axes.pcolormesh()
.Deprecated since version 0.0.0.dev2: Use
mdtools.plot.pcolormesh_new()
instead.- Parameters:
ax (
matplotlib.axes.Axes
) – The axes to draw to.x (
array_like
) – One dimensional array containing the x data.y (
array_like
) – One dimensional array containing the y data.z (
array_like
) – Array of shape(len(y)-1, len(x)-1)
containing the z data. Note: The grid orientation follows the standard matrix convention, i.e. an array z with shape(nrows, ncolumns)
is plotted with the column number as x and the row number as y.cax (
matplotlib.axes.Axes
, optional) – The axes to put the colorbar in.xmin (
scalar
, optional) – Left limit for plotting on x-axis. The left limit may be greater than the right limit, in which case the tick values will show up in decreasing order. Default isNone
, which means set the left limit tonp.nanmin(x)
.xmax (
float
, optional) – Right limit for plotting on x-axis. Default isNone
, which means set the left limit tonp.nanmax(x)
.ymin, ymax (
scalar
, optional) – Same as xmin and xmax, but for the y-axis.xlabel (
str
, optional) – Label for the x-axis.ylabel (
str
, optional) – Label for the y-axis.cbarlabel (
str
, optional) – Label for the colorbar.kwargs (
dict
, optional) – Keyword arguments to pass tomatplotlib.axes.Axes.pcolormesh()
. See there for possible keyword arguments.
- Returns:
heatmap (
matplotlib.collections.QuadMesh
) – Amatplotlib.collections.QuadMesh
.