Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 36c0201

Browse files
committed
Add test for #7617
1 parent 3628b23 commit 36c0201

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

lib/mpl_toolkits/axisartist/tests/test_axislines.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,23 @@ def test_axisline_style_tight():
131131

132132
for direction in ("left", "right", "bottom", "top"):
133133
ax.axis[direction].set_visible(False)
134+
135+
136+
@image_comparison(['subplotzero_ylabel.png'], style='mpl20')
137+
def test_subplotzero_ylabel():
138+
fig = plt.figure()
139+
ax = SubplotZero(fig, 111)
140+
_ = fig.add_subplot(ax)
141+
142+
for direction in ["xzero", "yzero"]:
143+
ax.axis[direction].set_visible(True)
144+
ax.axis[direction].set_axisline_style("->")
145+
# Set outward ticks
146+
ax.axis[direction].major_ticks.set_tick_out(True)
147+
ax.axis[direction].minor_ticks.set_tick_out(True)
148+
149+
ax.axis["yzero"].set_axis_direction("left")
150+
151+
plt.plot([0, 1], [0, 1], c="blue", lw=2)
152+
plt.xlabel('x')
153+
plt.ylabel('y')

0 commit comments

Comments
 (0)