Home > Software engineering >  Matplotlib colorbar: __init__() got an unexpected keyword argument 'location'
Matplotlib colorbar: __init__() got an unexpected keyword argument 'location'

Time:10-28

I was trying to plot a matplotlib colorbar to the left of my axis following the example given here: enter image description 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')

enter image description here

  • Related