joferkington / mplstereonet

Stereonets for matplotlib
MIT License
189 stars 66 forks source link

Issue when adding a colorbar #32

Open pvernant opened 4 years ago

pvernant commented 4 years ago

Hi,

When adding a colorbar, the annotations around the grid try to encompass the grid and the colorbar leading to something strange. Am I missing something ?

Thanks. Phil

image

joferkington commented 4 years ago

This used to work with older versions of matplotlib. It seems some things have changed in the meantime. I'll have a fix soon. Sorry about that, and thanks for the report!

robgeotech commented 4 years ago

@pvernant I found a work around to this.... it involved adding a separate axis for the colorbar into the plot

cbaxes = fig.add_axes([0.05, 0.2, 0.02, 0.6]) #Add additional axis for colorbar plt.colorbar(cbname, cax = cbaxes, shrink = 0.8)

T_GXD015

See the original answer at this link... https://stackoverflow.com/questions/13310594/positioning-the-colorbar