kwant.plotter.
scalarplot
(field, box, cmap=None, colorbar=True, file=None, show=True, dpi=None, fig_size=None, ax=None, vmin=None, vmax=None, background='#e0e0e0')[source]¶Draw a scalar field in Kwant style
Internally, this routine uses matplotlib’s imshow.
2d scalar field to plot.
the realspace extents of field
: ((x0, x1), (y0, y1))
Colormap for the background color plot. When not set the colormap “kwant_red” is used by default.
Whether to show a colorbar if a colormap is used. Ignored if ax is provided.
The output file. If not provided, output will be shown instead.
Whether matplotlib.pyplot.show()
is to be called, and the output is
to be shown immediately.
Number of pixels per inch. If not set the matplotlib
default is
used.
Figure size (width, height)
in inches. If not set, the default
matplotlib
value is used.
matplotlib.axes.Axes
instance, optionalIf ax
is provided, no new figure is created, but the plot is done
within the existing Axes ax
. in this case, file
, show
,
dpi
and fig_size
are ignored.
The lower/upper saturation limit for the colormap.
Areas outside the system are filled with this color.
A figure with the output if ax
is not set, else None.