@@ -60,6 +60,26 @@ def test_axes3d_repr():
6060 "title={'center': 'title'}, xlabel='x', ylabel='y', zlabel='z'>" )
6161
6262
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+
6383@mpl3d_image_comparison (['bar3d.png' ])
6484def test_bar3d ():
6585 fig = plt .figure ()
@@ -1839,9 +1859,9 @@ def test_scatter_spiral():
18391859 [0.0 , 0.0 , - 1.142857 , 10.571429 ],
18401860 ],
18411861 [
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 ]),
18451865 ],
18461866 [2 , 2 , 0 ],
18471867 ),
@@ -1854,9 +1874,9 @@ def test_scatter_spiral():
18541874 [0.0 , - 1.142857 , 0.0 , 10.571429 ],
18551875 ],
18561876 [
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 ]),
18601880 ],
18611881 [1 , 2 , 1 ],
18621882 ),
0 commit comments