-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Error for bbox_inches='tight' in savefig with make_axes_locatable #12355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Milestone
Comments
This should probably be reported in the base map subgroup. Can you make this self contained? Things changed for drawing colorbars in MPL 3.0 and it’s possible we broke something for basemap, but it’s hard to know what. |
OK, I will report it in the basemap subgroup. |
OK I can reproduce in Matplotlib: Edit: has nothing to do with colorbar: import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
fig, ax = plt.subplots()
divider = make_axes_locatable(ax)
cax = divider.append_axes('right', size='5%', pad='2%')
plt.savefig('boo.pdf', dpi=300, bbox_inches='tight') # wrong
|
Crossref matplotlib/basemap#426 |
Bisect says it was my PR: #9855 |
This was referenced Oct 1, 2018
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug summary
When setting bbox_inches='tight' in savefig function, the colorbar is plotted in the wrong way.
Code for reproduction
Actual outcome
The wrong one:

Expected outcome
The correct figure:

Matplotlib version
print(matplotlib.get_backend())
): module://backend_interaggI install matplotlib and basemap from https://www.lfd.uci.edu/~gohlke/pythonlibs.
The text was updated successfully, but these errors were encountered: