String formatting can by used to specify scientific notation for matplotlib.basemap colorbar labels:
cb = m.colorbar(cs, ax=ax1, format='%.4e')
But then each label is scientifically notated with the base.
If numbers are large enough, the colobar automatically reduces them to scientific notation, placing the base (i.e. x10^n
) at the top of the color bar, leaving only the coefficient numbers as labels.
You can do this with a standard axis with the following:
ax.ticklabel_format(style='sci', axis='y', scilimits=(0,0))
Is there an equivalent method for matplotlib.basemap colorbars, or perhaps a standard matplotlib colorbar?
basemap
colorbar? Thanks Joe. – Bassorilievo