Tibor Sekera wrote:
if the data plotted are very small, I don't want to show them. I know how to saturate the colorbar color using matplotlib.pyplot.clim But how to 'saturate' the streamlines (i.e. plot no streamlines)?
If I understand you correctly you'd like to have something similar to
the vmin/vmax parameters of kwant.plotter.map? There, one can show two
different plots with the same colorbar scales.
This is not possible with stock Kwant, because matplotlib's streamplot
that does the actual work of tracing the stream lines does not support
such functionality. (It does not fit into its logic because
streamplot's stream lines are not meant to blend into the background.)
Kwant's streamplot (kwant.plotter.streamplot) builds on matplotlib's by
showing a background image of local flow strength and by scaling the
line width according to it. Some matplotlib backends (notably PDF) have
a minimum line width, and that's why Kwant's streamplot simulates
thinner lines by blending their color into the background color.
Thanks to this, it would actually make sense to have a vmax argument for
Kwant's streamplot. I made a quick prototype (patch attached). To
apply it you must install Kwant from source. Use the command "git apply
vmax.patch" if you are using git and otherwise use "patch -p1