kwant.plotter.
density
(syst, density, relwidth=0.05, **kwargs)[source]¶Show an interpolated density defined on the sites of a system.
The system sites, together with a scalar per site defines a “discrete” density field that is nonzero only on the sites.
To make this scalar field easier to visualize and interpret at different
length scales, it is smoothed by convoluting it with the bellshaped bump
function f(r) = max(1  (2*r / width)**2, 0)**2
. The bump width is
determined by the relwidth
parameter.
This routine samples the smoothed field on a regular (square or cubic) grid and displays it using matplotlib’s imshow.
This function is similar to map
, but generally gives more
appealing visual results when used on systems with many sites. If you want
sitelevel resolution you may be better off using map
.
This is a convenience function that is equivalent to
scalarplot(*interpolate_density(syst, density, relwidth), **kwargs)
.
The longer form makes it possible to tweak additional options of
interpolate_density
.
Parameters:  syst :
density : sequence of float
relwidth : float or None
**kwargs : various


Returns:  fig : matplotlib figure

See also