I was trying to plot a matplotlib colorbar to the left of my axis following the example given here:
You can avoid this by adding the following after the colorbar has been drawn (since the colorbar will undo the change):
cax.yaxis.tick_left()
cax.yaxis.set_label_position('left')