Skip to content
Snippets Groups Projects

Viz add colorbar

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
+ 1
1
@@ -186,7 +186,7 @@ def slices(
if cbar:
norm = matplotlib.colors.Normalize(vmin=vmin, vmax=vmax, clip=True)
mappable = matplotlib.cm.ScalarMappable(norm=norm, cmap=cmap)
fig.colorbar(mappable=mappable, ax=axs, orientation='vertical')
fig.colorbar(mappable=mappable, ax=np.atleast_1d(axs[0])[-1], orientation='vertical')
if show:
plt.show()
Loading