Skip to content

Commit 83e8a00

Browse files
committed
Add test
1 parent 62804e8 commit 83e8a00

File tree

4 files changed

+260
-0
lines changed

4 files changed

+260
-0
lines changed
Binary file not shown.
Loading
Lines changed: 241 additions & 0 deletions
Loading

lib/matplotlib/tests/test_tightlayout.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,25 @@ def test_tight_layout8():
159159
example_plot(ax, fontsize=24)
160160

161161

162+
@image_comparison(baseline_images=['outward_ticks'], remove_text=True)
163+
def test_outward_ticks():
164+
'Test automatic use of tight_layout'
165+
fig = plt.figure()
166+
ax = fig.add_subplot(221)
167+
ax.xaxis.set_tick_params(tickdir='out', length=32, width=3)
168+
ax.yaxis.set_tick_params(tickdir='out', length=32, width=3)
169+
ax = fig.add_subplot(222)
170+
ax.xaxis.set_tick_params(tickdir='in', length=32, width=3)
171+
ax.yaxis.set_tick_params(tickdir='in', length=32, width=3)
172+
ax = fig.add_subplot(223)
173+
ax.xaxis.set_tick_params(tickdir='inout', length=32, width=3)
174+
ax.yaxis.set_tick_params(tickdir='inout', length=32, width=3)
175+
ax = fig.add_subplot(224)
176+
ax.xaxis.set_tick_params(tickdir='out', length=32, width=3)
177+
ax.yaxis.set_tick_params(tickdir='out', length=32, width=3)
178+
plt.tight_layout()
179+
180+
162181
def add_offsetboxes(ax, size=10, margin=.1, color='black'):
163182
"""
164183
Surround ax with OffsetBoxes

0 commit comments

Comments
 (0)