FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

make_axes_locatable : Colorbar in the middle instead of bottom while saving a pdf, png. · Issue #12624 · matplotlib/matplotlib · GitHub

Repository navigation

make_axes_locatable : Colorbar in the middle instead of bottom while saving a pdf, png. #12624

Closed

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

import numpy as np
from matplotlib import pyplot as plt 
from mpl_toolkits.axes_grid1 import make_axes_locatable

epsilon = 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()

Activity

  1. changed the title [-]make_axes_locatable : Colorbar in the middle instead of bottom while saving a pdf.[/-] [+]make_axes_locatable : Colorbar in the middle instead of bottom while saving a pdf,png.[/+] on Oct 25, 2018
  2. changed the title [-]make_axes_locatable : Colorbar in the middle instead of bottom while saving a pdf,png.[/-] [+]make_axes_locatable : Colorbar in the middle instead of bottom while saving a pdf, png.[/+] on Oct 25, 2018
  3. jklymak commented on Oct 25, 2018

    Member

    This has already been reported and will be fixed 3.0.1. To avoid until 3.0.1 is released don’t use tight layout or revert to 2.2.3.

    Thanks and sorry for the bother.

  4. navdeeprana commented on Oct 25, 2018

    Author

    Thank you for the information. I tried searching if it was already reported or not. I found similar issues but not the same.

  5. jklymak commented on Oct 25, 2018

    Member

    I can confirm that this seems to work fine in the just-tagged v.3.0.1... This was closed by #12363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL