8000 Test image for axis positions · matplotlib/matplotlib@7341d07 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7341d07

Browse files
Test image for axis positions
1 parent 823adeb commit 7341d07

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Loading

lib/mpl_toolkits/mplot3d/tests/test_axes3d.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,18 @@ def test_axes3d_labelpad():
10021002
tick.set_pad(tick.get_pad() - i * 5)
10031003

10041004

1005+
@mpl3d_image_comparison(['axis_positions.png'],
1006+
remove_text=False, style='mpl20')
1007+
def test_axis_positions():
1008+
positions = ['upper', 'lower', 'both', 'none']
1009+
fig, axs = plt.subplots(2, 2, subplot_kw={'projection': '3d'})
1010+
for ax, pos in zip(axs.flatten(), positions):
1011+
for axis in ax.xaxis, ax.yaxis, ax.zaxis:
1012+
axis._label_position = pos
1013+
axis._tick_position = pos
1014+
ax.set(xlabel='x', ylabel='y', zlabel='z', title=pos)
1015+
1016+
10051017
@mpl3d_image_comparison(['axes3d_cla.png'], remove_text=False, style='mpl20')
10061018
def test_axes3d_cla():
10071019
# fixed in pull request 4553

0 commit comments

Comments
 (0)
0