@@ -2943,23 +2943,17 @@ def _update_title_position(self, renderer):
29432943
29442944 titles = (self .title , self ._left_title , self ._right_title )
29452945
2946+ # Need to check all our twins too, and all the children as well.
2947+ axs = self ._twinned_axes .get_siblings (self ) + self .child_axes
2948+ for ax in self .child_axes : # Child positions must be updated first.
2949+ locator = ax .get_axes_locator ()
2950+ ax .apply_aspect (locator (self , renderer ) if locator else None )
2951+
29462952 for title in titles :
29472953 x , _ = title .get_position ()
29482954 # need to start again in case of window resizing
29492955 title .set_position ((x , 1.0 ))
2950- # need to check all our twins too...
2951- axs = self ._twinned_axes .get_siblings (self )
2952- # and all the children
2953- for ax in self .child_axes :
2954- if ax is not None :
2955- locator = ax .get_axes_locator ()
2956- if locator :
2957- pos = locator (self , renderer )
2958- ax .apply_aspect (pos )
2959- else :
2960- ax .apply_aspect ()
2961- axs = axs + [ax ]
2962- top = - np .Inf
2956+ top = - np .inf
29632957 for ax in axs :
29642958 bb = None
29652959 if (ax .xaxis .get_ticks_position () in ['top' , 'unknown' ]
@@ -3016,11 +3010,7 @@ def draw(self, renderer):
30163010
30173011 # loop over self and child Axes...
30183012 locator = self .get_axes_locator ()
3019- if locator :
3020- pos = locator (self , renderer )
3021- self .apply_aspect (pos )
3022- else :
3023- self .apply_aspect ()
3013+ self .apply_aspect (locator (self , renderer ) if locator else None )
30243014
30253015 artists = self .get_children ()
30263016 artists .remove (self .patch )
@@ -4396,11 +4386,8 @@ def get_tightbbox(self, renderer=None, call_axes_locator=True,
43964386 return None
43974387
43984388 locator = self .get_axes_locator ()
4399- if locator and call_axes_locator :
4400- pos = locator (self , renderer )
4401- self .apply_aspect (pos )
4402- else :
4403- self .apply_aspect ()
4389+ self .apply_aspect (
4390+ locator (self , renderer ) if locator and call_axes_locator else None )
44044391
44054392 for axis in self ._axis_map .values ():
44064393 if self .axison and axis .get_visible ():
0 commit comments