@@ -60,6 +60,26 @@ def test_axes3d_repr():
60
60
"title={'center': 'title'}, xlabel='x', ylabel='y', zlabel='z'>" )
61
61
62
62
63
+ @mpl3d_image_comparison (['axes3d_primary_views.png' ])
64
+ def test_axes3d_primary_views ():
65
+ # (elev, azim, roll)
66
+ views = [(90 , - 90 , 0 ), # XY
67
+ (0 , - 90 , 0 ), # XZ
68
+ (0 , 0 , 0 ), # YZ
69
+ (- 90 , 90 , 0 ), # -XY
70
+ (0 , 90 , 0 ), # -XZ
71
+ (0 , 180 , 0 )] # -YZ
72
+ # When viewing primary planes, draw the two other axes on left and bottom
73
+ fig , axs = plt .subplots (2 , 3 , subplot_kw = {'projection' : '3d' })
74
+ for i , ax in enumerate ([ax for ax_row in axs for ax in ax_row ]):
75
+ ax .set_xlabel ('x' )
76
+ ax .set_ylabel ('y' )
77
+ ax .set_zlabel ('z' )
78
+ ax .set_proj_type ('ortho' )
79
+ ax .view_init (elev = views [i ][0 ], azim = views [i ][1 ], roll = views [i ][2 ])
80
+ plt .tight_layout ()
81
+
82
+
63
83
@mpl3d_image_comparison (['bar3d.png' ])
64
84
def test_bar3d ():
65
85
fig = plt .figure ()
@@ -1839,9 +1859,9 @@ def test_scatter_spiral():
1839
1859
[0.0 , 0.0 , - 1.142857 , 10.571429 ],
1840
1860
],
1841
1861
[
1842
- ([0.06329114 , - 0.06329114 ], [- 0.04746835 , - 0.04746835 ]),
1843
- ([- 0.06329114 , - 0.06329114 ], [0.04746835 , - 0.04746835 ]),
1844
- ([0.05617978 , 0.06329114 ], [- 0.04213483 , - 0.04746835 ]),
1862
+ ([- 0.06329114 , 0.06329114 ], [0.04746835 , 0.04746835 ]),
1863
+ ([0.06329114 , 0.06329114 ], [- 0.04746835 , 0.04746835 ]),
1864
+ ([- 0.05617978 , - 0.06329114 ], [0.04213483 , 0.04746835 ]),
1845
1865
],
1846
1866
[2 , 2 , 0 ],
1847
1867
),
@@ -1854,9 +1874,9 @@ def test_scatter_spiral():
1854
1874
[0.0 , - 1.142857 , 0.0 , 10.571429 ],
1855
1875
],
1856
1876
[
1857
- ([- 0.06329114 , - 0.06329114 ], [- 0.04746835 , 0.04746835 ]),
1858
- ([0.06329114 , 0.05617978 ], [- 0.04746835 , - 0.04213483 ]),
1859
- ([0.06329114 , - 0.06329114 ], [- 0.04746835 , - 0.04746835 ]),
1877
+ ([- 0.06329114 , - 0.06329114 ], [0.04746835 , - 0.04746835 ]),
1878
+ ([0.06329114 , 0.05617978 ], [0.04746835 , 0.04213483 ]),
1879
+ ([0.06329114 , - 0.06329114 ], [0.04746835 , 0.04746835 ]),
1860
1880
],
1861
1881
[1 , 2 , 1 ],
1862
1882
),
0 commit comments