imshow_new
- mdtools.plot.imshow_new(*args, ax, cbar=True, cax=None, **kwargs)[source]
Plot two dimensional data as colormap with
matplotlib.axes.Axes.imshow()
.See
matplotlib.axes.Axes.imshow()
andmatplotlib.pyplot.colorbar()
for more details.- Parameters:
args (
iterable
, optional) – Positional arguments to parse tomatplotlib.axes.Axes.imshow()
.ax (
matplotlib.axes.Axes
) – Thematplotlib.axes.Axes
to which to draw the image.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.imshow()
.
- Returns:
img (
matplotlib.image.AxesImage
) – The image.cbar (
matplotlib.colorbar.Colorbar
) – The colorbar. Only created and returned if cbar isTrue
.
Notes
The following defaults of
matplotlib.axes.Axes.imshow()
are changed:rasterized is set to
True
.
In contrast to the default MDTools plotting style, the axis ticks are drawn outside of the plot.