Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
tight_layout does not work with set_visible(False) #8225
Comments
ResidentMario
referenced
this issue
in pandas-dev/pandas
Mar 8, 2017
Closed
BUG: DataFrame.hist() does not get along with matplotlib.pyplot.tight_layout() #15602
|
Looks like the tight_layout code is iterating over all of the subplots rather than just the visible ones |
|
My suspicion is that adding a condition to the list comprehension:
at line 126 of matplotlib.tight_layout.py should do the trick. |
ResidentMario
referenced
this issue
Mar 8, 2017
Merged
BUG Ignore invisible axes in computing tight_layout #8244
tacaswell
added this to the
2.0.1 (next bug fix release)
milestone
Mar 8, 2017
|
Those two commands do very different things, fig, ax = plt.subplots()
ax.plot(range(5))
ax.axis('off')
where are |
|
Which is why they look the same output-wise when the plot is empty in the first place (except for dimensional differences), gotcha. |
ResidentMario
changed the title from
tight_layout works with axis('off') but not with set_visible(False) to tight_layout does not work with set_visible(False)
Mar 10, 2017
ResidentMario
referenced
this issue
in pandas-dev/pandas
Mar 12, 2017
Closed
DataFrame.hist() does not get along with matplotlib.pyplot.tight_layout() #9351
ResidentMario
closed this
Mar 12, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

ResidentMario commentedMar 7, 2017
Bug report
Bug summary
tight_layout()cooperates withaxis('off')but not withset_visible(False).Code for reproduction
This code fails:
This code succeeds:
Actual outcome
Expected outcome