matshow_new
- mdtools.plot.matshow_new(*args, ax, cbar=True, cax=None, **kwargs)[source]
Plot two dimensional data as colormap with
matplotlib.axes.Axes.matshow().See
matplotlib.axes.Axes.matshow()andmatplotlib.pyplot.colorbar()for more details.- Parameters:
args (
iterable, optional) – Positional arguments to parse tomatplotlib.axes.Axes.matshow().ax (
matplotlib.axes.Axes) – Thematplotlib.axes.Axesto which to draw the image.cbar (
bool, optional) – IfTrue, create a colorbar and plot it either in thematplotlib.axes.Axesgiven 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.matshow().
- 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.matshow()are changed:rasterized is set to
True.
In contrast to the default MDTools plotting style, the axis ticks are drawn outside of the plot.