You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tight_layout does not work with set_visible(False) #8225
changed the title [-]tight_layout works with axis('off') but not with set_visible(False)[/-][+]tight_layout does not work with set_visible(False)[/+]on Mar 10, 2017
Activity
WeatherGod commentedon Mar 8, 2017
Looks like the tight_layout code is iterating over all of the subplots rather than just the visible ones
WeatherGod commentedon Mar 8, 2017
My suspicion is that adding a condition to the list comprehension:
at line 126 of matplotlib.tight_layout.py should do the trick.
tacaswell commentedon Mar 10, 2017
Those two commands do very different things,
axis('off')makes the spines invisible, but everything else is still visible exgives

where are
ax.set_visible(False)makes theAxesobject (and all of it's children) are not included in the draw tree.ResidentMario commentedon Mar 10, 2017
Which is why they look the same output-wise when the plot is empty in the first place (except for dimensional differences), gotcha.
[-]tight_layout works with axis('off') but not with set_visible(False)[/-][+]tight_layout does not work with set_visible(False)[/+]