File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,16 @@ def test_get_labels():
5959 assert ax .get_ylabel () == 'y label'
6060
6161
62+ def test_repr ():
63+ fig , ax = plt .subplots ()
64+ ax .set_label ('label' )
65+ ax .set_title ('title' )
66+ ax .set_xlabel ('x' )
67+ ax .set_ylabel ('y' )
68+ assert repr (ax ) == ("<AxesSubplot:label='label', " +
69+ "title={'center':'title'}, xlabel='x', ylabel='y'>" )
70+
71+
6272@check_figures_equal ()
6373def test_label_loc_vertical (fig_test , fig_ref ):
6474 ax = fig_test .subplots ()
Original file line number Diff line number Diff line change @@ -34,6 +34,19 @@ def test_aspect_equal_error():
3434 ax .set_aspect ('equal' )
3535
3636
37+ def test_axes3d_repr ():
38+ fig = plt .figure ()
39+ ax = fig .add_subplot (projection = '3d' )
40+ ax .set_label ('label' )
41+ ax .set_title ('title' )
42+ ax .set_xlabel ('x' )
43+ ax .set_ylabel ('y' )
44+ ax .set_zlabel ('z' )
45+ assert repr (ax ) == ("<Axes3DSubplot:label='label', " +
46+ "title={'center':'title'}, " +
47+ "xlabel='x', ylabel='y', zlabel='z'>" )
48+
49+
3750@mpl3d_image_comparison (['bar3d.png' ])
3851def test_bar3d ():
3952 fig = plt .figure ()
You can’t perform that action at this time.
0 commit comments