File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2052,6 +2052,7 @@ def draw(self, renderer):
2052
2052
2053
2053
finally :
2054
2054
self .stale = False
2055
+ print ('Drawing sub' )
2055
2056
2056
2057
2057
2058
@@ -2682,13 +2683,14 @@ def clear(self, keep_observers=False):
2682
2683
def draw (self , renderer ):
2683
2684
# docstring inherited
2684
2685
self ._cachedRenderer = renderer
2686
+ "Drawing Figure"
2685
2687
2686
2688
# draw the figure bounding box, perhaps none for white figure
2687
2689
if not self .get_visible ():
2688
2690
return
2689
2691
2690
2692
artists = self ._get_draw_artists (renderer )
2691
-
2693
+
2692
2694
try :
2693
2695
renderer .open_group ('figure' , gid = self .get_gid ())
2694
2696
if self .get_constrained_layout () and self .axes :
Original file line number Diff line number Diff line change @@ -407,8 +407,11 @@ def apply_aspect(self, position=None):
407
407
# in the superclass, we would go through and actually deal with axis
408
408
# scales and box/datalim. Those are all irrelevant - all we need to do
409
409
# is make sure our coordinate system is square.
410
- figW , figH = self .get_figure ().get_size_inches ()
411
- fig_aspect = figH / figW
410
+ trans = self .get_figure ().transPanel
411
+ bb = mtransforms .Bbox .from_bounds (0 , 0 , 1 , 1 ).transformed (trans )
412
+ # this is the physical aspect of the panel (or figure):
413
+ fig_aspect = bb .height / bb .width
414
+
412
415
box_aspect = 1
413
416
pb = position .frozen ()
414
417
pb1 = pb .shrunk_to_aspect (box_aspect , pb , fig_aspect )
@@ -463,6 +466,7 @@ def draw(self, renderer):
463
466
axis .draw (renderer )
464
467
465
468
# Then rest
469
+ print ("draw" )
466
470
super ().draw (renderer )
467
471
468
472
def get_axis_position (self ):
You can’t perform that action at this time.
0 commit comments