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():
59
59
assert ax .get_ylabel () == 'y label'
60
60
61
61
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
+
62
72
@check_figures_equal ()
63
73
def test_label_loc_vertical (fig_test , fig_ref ):
64
74
ax = fig_test .subplots ()
Original file line number Diff line number Diff line change @@ -34,6 +34,19 @@ def test_aspect_equal_error():
34
34
ax .set_aspect ('equal' )
35
35
36
36
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
+
37
50
@mpl3d_image_comparison (['bar3d.png' ])
38
51
def test_bar3d ():
39
52
fig = plt .figure ()
You can’t perform that action at this time.
0 commit comments