I create a horizontal color bar with this code:
cbaxes = fig.add_axes([0.05, 0.15, 0.9, 0.025]) # setup colorbar axes. cb = fig.colorbar(cax=cbaxes, mappable=mappable, orientation='horizontal',) cb.set_label(r"$[10^{14}\ molec\,cm^{-2}]$", fontname='Arial', fontsize='small') cbytick_obj = plt.getp(cb.ax.axes, 'xticklabels') plt.setp(cbytick_obj, color='r', fontsize='x-small') cb.ax.set_yticks(arange(vmin, vmax, 2), size='small')
However, I want the label to be printed above the color bar (instead of below). How can i do this?
source share