Hi Jannis,

you have to do this by hand, like so

```
fig = plt.figure()
ax = fig.add_subplot()

cmap = cm.magma # your cmap
site_color = np.ones(len(syst.sites())) # or your colors
vmin = 1 
vmax = 2 # your color bounds
norm = colors.Normalize(vmin=vmin, vmax=vmax)
normalized_colors = norm(site_color)
# cmap(normalized_colors) return the colors as an RGBA array
kwant.plot(syst.finalized(), site_color=cmap(normalized_colors), ax=ax)
mappable = cm.ScalarMappable(cmap=cmap, norm=norm);
fig.colorbar(mappable);
```

Best,
Pablo

Reply via email to