8000 add broken code? commented out · matplotlib/matplotlib@8f71fd1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8f71fd1

Browse files
committed
add broken code? commented out
1 parent e0a20cc commit 8f71fd1

File tree

1 file changed

+12
-27
lines changed

1 file changed

+12
-27
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2941,32 +2941,6 @@ def handle_single_axis(
29412941
scaley, self._shared_axes["y"], 'y', self.yaxis, self._ymargin,
29422942
y_stickies, self.set_ybound)
29432943

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-
29702944
def _update_title_position(self, renderer):
29712945
"""
29722946
Update the title position based on the bounding box enclosing
@@ -2976,7 +2950,18 @@ def _update_title_position(self, renderer):
29762950
_log.debug('title position was updated manually, not adjusting')
29772951
return
29782952

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]
29802965

29812966
for title in titles:
29822967
x, _ = title.get_position()

0 commit comments

Comments
 (0)
0