Skip to content

plt.tight_layout(pad=0) cuts away outer ticks #5281

Closed
@maxnoe

Description

@maxnoe

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:

outer_ticks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions