Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Description
cax added using make_axes_locatable shows up at the middle of the image, instead of bottom while saving figures. I have tried .png and .pdf . The output from plt.show() is correct.
python 3.6.6 :: Anaconda custom (64-bit)
numpy version 1.15.3
matplotlib version 3.0.0
Here's a minimal script, which reproduces the result
importnumpyasnpfrommatplotlibimportpyplotaspltfrommpl_toolkits.axes_grid1importmake_axes_locatableepsilon=np.random.rand(128,128)fig,ax=plt.subplots(figsize=(6,6))cax=make_axes_locatable(ax).append_axes('bottom',size='5%',pad=0.05)im=ax.imshow(epsilon,origin='lower')fig.colorbar(im,cax=cax,orientation='horizontal')fig.tight_layout()fig.savefig('test.png',dpi=200,bbox_inches='tight')plt.show()