@@ -2941,32 +2941,6 @@ def handle_single_axis(
2941
2941
scaley , self ._shared_axes ["y" ], 'y' , self .yaxis , self ._ymargin ,
2942
2942
y_stickies , self .set_ybound )
2943
2943
2944
- def _get_titles_siblings (self , renderer ):
2945
- """
2946
- Get the bounding boxes for this `.axis` and its siblings
2947
- as set by `.Figure.align_titles`.
2948
-
2949
- By default it just gets bboxes for self.
2950
- """
2951
- # Get the Grouper keeping track of title groups for this figure.
2952
- axis_names = [
2953
- name for name , axis in self .axes ._axis_map .items ()
2954
- if name in self .figure ._align_label_groups and axis is self ]
2955
- if len (axis_names ) != 1 :
2956
- return [], []
2957
- axis_name , = axis_names
2958
- grouper = self .figure ._align_label_groups [axis_name ]
2959
- bboxes = []
2960
- bboxes2 = []
2961
- # If we want to align labels from other Axes:
2962
- for ax in grouper .get_siblings (self .axes ):
2963
- axis = getattr (ax , f"{ axis_name } axis" )
2964
- ticks_to_draw = axis ._update_ticks ()
2965
- tlb , tlb2 = axis ._get_ticklabel_bboxes (ticks_to_draw , renderer )
2966
- bboxes .extend (tlb )
2967
- bboxes2 .extend (tlb2 )
2968
- return bboxes , bboxes2
2969
-
2970
2944
def _update_title_position (self , renderer ):
2971
2945
"""
2972
2946
Update the title position based on the bounding box enclosing
@@ -2976,7 +2950,18 @@ def _update_title_position(self, renderer):
2976
2950
_log .debug ('title position was updated manually, not adjusting' )
2977
2951
return
2978
2952
2979
- titles = (self .title , self ._left_title , self ._right_title )
2953
+ titles = []
2954
+
2955
+ # Get grouped axes for alignment if align_titles was previously called
2956
+ # grouped_axs = self.figure._align_title_groups.get_siblings(self)
2957
+ # if(grouped_axs is not None):
2958
+ # titles = []
2959
+ # for ax in grouped_axs:
2960
+ # titles.extend([ax.title, ax._left_title, ax._right_title])
2961
+ # else:
2962
+ # titles = [self.title, self._left_title, self._right_title]
2963
+
2964
+ titles = [self .title , self ._left_title , self ._right_title ]
2980
2965
2981
2966
for title in titles :
2982
2967
x , _ = title .get_position ()
0 commit comments