One could generate a vertical colorbar like so(simplified):
import matplotlib.pyplot as plt
import matplotlib as mpl
plt.figure()
c_ax=plt.subplot(111)
cb =
I don't know why, but none of these commands worked for me. If that's also your case, I solved the issue by specifying the colorbar property
location='left'
which takes care of both the ticks and the label. If you still want the colorbar to be on the right side of the plot, just define a new axis limited to the position you want and link you colorbar to it.
cbar_ax=fig.add_axes([x0, y0, width, height])