@@ -53,20 +53,20 @@ def test_fignum_exists():
53
53
54
54
@cleanup
55
55
def test_clf_keyword ():
56
- # test if existing figure is cleared with figure() and subplots()
57
- fig0 = plt .figure (num = 1 )
58
- fig0 .suptitle ("A fancy plot" )
59
- assert_equal ([t .get_text () for t in fig0 .texts ], ["A fancy plot" ])
60
-
61
- fig1 = plt .figure (num = 1 , clear = False )
62
- fig1 .text (0.5 , 0.5 , "Really fancy!" )
63
- assert_true (fig0 is fig1 )
64
- assert_equal ([t .get_text () for t in fig1 .texts ],
65
- ["A fancy plot" , 'Really fancy!' ])
66
-
67
- fig2 , ax2 = plt .subplots (2 , 1 , num = 1 , clear = True )
68
- assert_true (fig0 is fig2 )
69
- assert_equal ([t .get_text () for t in fig2 .texts ], [])
56
+ # test if existing figure is cleared with figure() and subplots()
57
+ fig0 = plt .figure (num = 1 )
58
+ fig0 .suptitle ("A fancy plot" )
59
+ assert_equal ([t .get_text () for t in fig0 .texts ], ["A fancy plot" ])
60
+
61
+ fig1 = plt .figure (num = 1 , clear = False )
62
+ fig1 .text (0.5 , 0.5 , "Really fancy!" )
63
+ assert_true (fig0 is fig1 )
64
+ assert_equal ([t .get_text () for t in fig1 .texts ],
65
+ ["A fancy plot" , 'Really fancy!' ])
66
+
67
+ fig2 , ax2 = plt .subplots (2 , 1 , num = 1 , clear = True )
68
+ assert_true (fig0 is fig2 )
69
+ assert_equal ([t .get_text () for t in fig2 .texts ], [])
70
70
71
71
72
72
@image_comparison (baseline_images = ['figure_today' ])
0 commit comments