Skip to content

Commit 378ce5b

Browse files
committed
Add test for remaining axis options
1 parent d7e050b commit 378ce5b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7244,6 +7244,16 @@ def test_secondary_repr():
72447244
assert repr(secax) == '<SecondaryAxis: >'
72457245

72467246

7247+
@image_comparison(['axis_options.png'], remove_text=True, style='mpl20')
7248+
def test_axis_options():
7249+
fig, axes = plt.subplots(2, 3)
7250+
for i, option in enumerate(('scaled', 'tight', 'image')):
7251+
axes[0, i].plot((1, 2), (1, 3.2))
7252+
axes[0, i].axis(option)
7253+
axes[1, i].plot((1, 2), (1, 1.5))
7254+
axes[1, i].axis(option)
7255+
7256+
72477257
def color_boxes(fig, ax):
72487258
"""
72497259
Helper for the tests below that test the extents of various axes elements

0 commit comments

Comments
 (0)