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 @@ -2845,7 +2845,7 @@ def redraw_in_frame(self):
2845
2845
with ExitStack () as stack :
2846
2846
for artist in [* self ._get_axis_list (),
2847
2847
self .title , self ._left_title , self ._right_title ]:
2848
- stack .push (artist .set_visible , artist .get_visible ())
2848
+ stack .callback (artist .set_visible , artist .get_visible ())
2849
2849
artist .set_visible (False )
2850
2850
self .draw (self .figure ._cachedRenderer )
2851
2851
Original file line number Diff line number Diff line change @@ -6612,6 +6612,13 @@ def test_bbox_aspect_axes_init():
6612
6612
assert_allclose (sizes , sizes [0 ])
6613
6613
6614
6614
6615
+ def test_redraw_in_frame ():
6616
+ fig , ax = plt .subplots (1 , 1 )
6617
+ ax .plot ([1 , 2 , 3 ])
6618
+ fig .canvas .draw ()
6619
+ ax .redraw_in_frame ()
6620
+
6621
+
6615
6622
def test_invisible_axes ():
6616
6623
# invisible axes should not respond to events...
6617
6624
fig , ax = plt .subplots ()
You can’t perform that action at this time.
0 commit comments