8000 Whats new for 3d axis positions · matplotlib/matplotlib@8d7b9f1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d7b9f1

Browse files
Whats new for 3d axis positions
1 parent 7341d07 commit 8d7b9f1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Specify ticks and axis label positions for 3D plots
2+
---------------------------------------------------
3+
4+
You can now specify the positions of ticks and axis labels for 3D plots.
5+
6+
.. plot::
7+
:include-source:
8+
9+
import matplotlib.pyplot as plt
10+
11+
positions = ['default', 'upper', 'lower', 'both', 'none']
12+
fig, axs = plt.subplots(1, 5, subplot_kw={'projection': '3d'})
13+
for ax, pos in zip(axs, positions):
14+
for axis in ax.xaxis, ax.yaxis, ax.zaxis:
15+
axis._label_position = pos
16+
axis._tick_position = pos
17+
ax.set(xlabel='x', ylabel='y', zlabel='z', title=pos)

0 commit comments

Comments
 (0)
0