File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2774,7 +2774,7 @@ def redraw_in_frame(self):
2774
2774
with ExitStack () as stack :
2775
2775
for artist in [* self ._get_axis_list (),
2776
2776
self .title , self ._left_title , self ._right_title ]:
2777
- stack .push (artist .set_visible , artist .get_visible ())
2777
+ stack .callback (artist .set_visible , artist .get_visible ())
2778
2778
artist .set_visible (False )
2779
2779
self .draw (self .figure ._cachedRenderer )
2780
2780
Original file line number Diff line number Diff line change @@ -6350,6 +6350,13 @@ def test_bbox_aspect_axes_init():
6350
6350
assert_allclose (sizes , sizes [0 ])
6351
6351
6352
6352
6353
+ def test_redraw_in_frame ():
6354
+ fig , ax = plt .subplots (1 , 1 )
6355
+ ax .plot ([1 , 2 , 3 ])
6356
+ fig .canvas .draw ()
6357
+ ax .redraw_in_frame ()
6358
+
6359
+
6353
6360
def test_invisible_axes ():
6354
6361
# invisible axes should not respond to events...
6355
6362
fig , ax = plt .subplots ()
You can’t perform that action at this time.
0 commit comments