Wenn I do plt.tight_layout(pad=0) outer ticks are not considered and cut away:
import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.get_yaxis().set_tick_params(direction='out') ax.get_xaxis().set_tick_params(direction='out') ax.set_xlim(0.05, 0.95) fig.tight_layout(pad=0) fig.savefig('outer_ticks.png', dpi=300)
Result:
Milestoning this as 2.0, since if we choose to go with outer ticks in the new defaults, we'll need to first fix this bug.
Fix matplotlib#5281: Include ticks in tight bounding box
Fixed by #5683.
Activity
mdboom commented on Oct 20, 2015
Milestoning this as 2.0, since if we choose to go with outer ticks in the new defaults, we'll need to first fix this bug.
Fix matplotlib#5281: Include ticks in tight bounding box
mdboom commented on Jan 25, 2016
Fixed by #5683.