Skip to content

Commit f1777c6

Browse files
committed
Drop axis_artist tickdir image compat, due to text-overhaul merge.
1 parent 61b6cdc commit f1777c6

4 files changed

Lines changed: 9 additions & 39 deletions

File tree

‎lib/mpl_toolkits/axisartist/tests/test_axis_artist.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def test_axis_artist():
9292
for loc in ('left', 'right', 'bottom'):
9393
helper = AxisArtistHelperRectlinear.Fixed(ax, loc=loc)
9494
axisline = AxisArtist(ax, helper, offset=None, axis_direction=loc)
95-
axisline.major_ticks.set_tick_direction("in")
95+
axisline.major_ticks.set_tick_direction({
96+
"left": "in", "right": "out", "bottom": "inout",
97+
}[loc])
9698
ax.add_artist(axisline)
9799

98100
# Settings for bottom AxisArtist.

‎lib/mpl_toolkits/axisartist/tests/test_axislines.py‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
# TODO: tighten tolerance after baseline image is regenerated for text overhaul
1111
@image_comparison(['SubplotZero.png'], style='default', tol=0.02)
1212
def test_SubplotZero():
13-
# Remove this line when this test image is regenerated.
14-
plt.rcParams.update({
15-
"text.kerning_factor": 6, "xtick.direction": "in", "ytick.direction": "in"})
16-
1713
fig = plt.figure()
1814

1915
ax = SubplotZero(fig, 1, 1, 1)
@@ -33,10 +29,6 @@ def test_SubplotZero():
3329
# TODO: tighten tolerance after baseline image is regenerated for text overhaul
3430
@image_comparison(['Subplot.png'], style='default', tol=0.02)
3531
def test_Subplot():
36-
# Remove this line when this test image is regenerated.
37-
plt.rcParams.update({
38-
"text.kerning_factor": 6, "xtick.direction": "in", "ytick.direction": "in"})
39-
4032
fig = plt.figure()
4133

4234
ax = Subplot(fig, 1, 1, 1)
@@ -64,7 +56,6 @@ def test_Axes():
6456
@image_comparison(['ParasiteAxesAuxTrans_meshplot.png'],
6557
remove_text=True, style='default', tol=0.075)
6658
def test_ParasiteAxesAuxTrans():
67-
# Remove this line when this test image is regenerated.
6859
plt.rcParams.update({"xtick.direction": "in", "ytick.direction": "in"})
6960
data = np.ones((6, 6))
7061
data[2, 2] = 2
@@ -97,7 +88,6 @@ def test_ParasiteAxesAuxTrans():
9788

9889
@image_comparison(['axisline_style.png'], remove_text=True, style='mpl20')
9990
def test_axisline_style():
100-
# Remove this line when this test image is regenerated.
10191
plt.rcParams.update({"xtick.direction": "in", "ytick.direction": "in"})
10292
fig = plt.figure(figsize=(2, 2))
10393
ax = fig.add_subplot(axes_class=AxesZero)
@@ -113,7 +103,6 @@ def test_axisline_style():
113103
@image_comparison(['axisline_style_size_color.png'], remove_text=True,
114104
style='mpl20')
115105
def test_axisline_style_size_color():
116-
# Remove this line when this test image is regenerated.
117106
plt.rcParams.update({"xtick.direction": "in", "ytick.direction": "in"})
118107
fig = plt.figure(figsize=(2, 2))
119108
ax = fig.add_subplot(axes_class=AxesZero)
@@ -129,7 +118,6 @@ def test_axisline_style_size_color():
129118
@image_comparison(['axisline_style_tight.png'], remove_text=True,
130119
style='mpl20')
131120
def test_axisline_style_tight():
132-
# Remove this line when this test image is regenerated.
133121
plt.rcParams.update({"xtick.direction": "in", "ytick.direction": "in"})
134122
fig = plt.figure(figsize=(2, 2), layout='tight')
135123
ax = fig.add_subplot(axes_class=AxesZero)
@@ -145,8 +133,6 @@ def test_axisline_style_tight():
145133
# TODO: tighten tolerance after baseline image is regenerated for text overhaul
146134
@image_comparison(['subplotzero_ylabel.png'], style='mpl20', tol=0.02)
147135
def test_subplotzero_ylabel():
148-
# Remove this line when this test image is regenerated.
149-
plt.rcParams.update({"xtick.direction": "in", "ytick.direction": "in"})
150136
fig = plt.figure()
151137
ax = fig.add_subplot(111, axes_class=SubplotZero)
152138

‎lib/mpl_toolkits/axisartist/tests/test_floating_axes.py‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@ def test_subplot():
1919
fig.add_subplot(ax)
2020

2121

22-
# Rather high tolerance to allow ongoing work with floating axes internals;
23-
# remove when image is regenerated.
24-
@image_comparison(['curvelinear3.png'], style='default', tol=5)
22+
@image_comparison(['curvelinear3.png'], style='default')
2523
def test_curvelinear3():
26-
# Remove this line when this test image is regenerated.
27-
plt.rcParams.update({"xtick.direction": "in", "ytick.direction": "in"})
2824
fig = plt.figure(figsize=(5, 5))
2925

3026
tr = (mtransforms.Affine2D().scale(np.pi / 180, 1) +
@@ -67,14 +63,8 @@ def test_curvelinear3():
6763
l.set_clip_path(ax1.patch)
6864

6965

70-
# Rather high tolerance to allow ongoing work with floating axes internals;
71-
# remove when image is regenerated.
72-
@image_comparison(['curvelinear4.png'], style='default', tol=0.9)
66+
@image_comparison(['curvelinear4.png'], style='default')
7367
def test_curvelinear4():
74-
# Remove this line when this test image is regenerated.
75-
plt.rcParams.update({
76-
"text.kerning_factor": 6, "xtick.direction": "in", "ytick.direction": "in"})
77-
7868
fig = plt.figure(figsize=(5, 5))
7969

8070
tr = (mtransforms.Affine2D().scale(np.pi / 180, 1) +

‎lib/mpl_toolkits/axisartist/tests/test_grid_helper_curvelinear.py‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717

1818
@image_comparison(['custom_transform.png'], style='default', tol=0.2)
1919
def test_custom_transform():
20-
# Remove this line when this test image is regenerated.
21-
plt.rcParams.update({"xtick.direction": "in", "ytick.direction": "in"})
20+
plt.rcParams.update({"xtick.direction": "in", "ytick.direction": "inout"})
2221

2322
class MyTransform(Transform):
2423
input_dims = output_dims = 2
@@ -79,11 +78,9 @@ def inverted(self):
7978
ax1.grid(True)
8079

8180

82-
# TODO: tighten tolerance after baseline image is regenerated for text overhaul
83-
@image_comparison(['polar_box.png'], style='default', tol=0.09)
81+
@image_comparison(['polar_box.png'], style='default')
8482
def test_polar_box():
85-
# Remove this line when this test image is regenerated.
86-
plt.rcParams.update({"xtick.direction": "in", "ytick.direction": "in"})
83+
plt.rcParams.update({"xtick.direction": "out", "ytick.direction": "inout"})
8784
fig = plt.figure(figsize=(5, 5))
8885

8986
# PolarAxes.PolarTransform takes radian. However, we want our coordinate
@@ -141,13 +138,8 @@ def test_polar_box():
141138
ax1.grid(True)
142139

143140

144-
# Remove tol & kerning_factor when this test image is regenerated.
145-
@image_comparison(['axis_direction.png'], style='default', tol=0.15)
141+
@image_comparison(['axis_direction.png'], style='default')
146142
def test_axis_direction():
147-
# Remove this line when this test image is regenerated.
148-
plt.rcParams.update({
149-
"text.kerning_factor": 6, "xtick.direction": "in", "ytick.direction": "in"})
150-
151143
fig = plt.figure(figsize=(5, 5))
152144

153145
# PolarAxes.PolarTransform takes radian. However, we want our coordinate

0 commit comments

Comments
 (0)