Update the offset_text position based on the sequence of bounding boxes of all the ticklabels
(self, bboxes, bboxes2)
| 2629 | (x, bbox.y1 + self.labelpad * self.get_figure(root=True).dpi / 72)) |
| 2630 | |
| 2631 | def _update_offset_text_position(self, bboxes, bboxes2): |
| 2632 | """ |
| 2633 | Update the offset_text position based on the sequence of bounding |
| 2634 | boxes of all the ticklabels |
| 2635 | """ |
| 2636 | x, y = self.offsetText.get_position() |
| 2637 | if not hasattr(self, '_tick_position'): |
| 2638 | self._tick_position = 'bottom' |
| 2639 | if self._tick_position == 'bottom': |
| 2640 | if not len(bboxes): |
| 2641 | bottom = self.axes.bbox.ymin |
| 2642 | else: |
| 2643 | bbox = mtransforms.Bbox.union(bboxes) |
| 2644 | bottom = bbox.y0 |
| 2645 | y = bottom - self.OFFSETTEXTPAD * self.get_figure(root=True).dpi / 72 |
| 2646 | else: |
| 2647 | if not len(bboxes2): |
| 2648 | top = self.axes.bbox.ymax |
| 2649 | else: |
| 2650 | bbox = mtransforms.Bbox.union(bboxes2) |
| 2651 | top = bbox.y1 |
| 2652 | y = top + self.OFFSETTEXTPAD * self.get_figure(root=True).dpi / 72 |
| 2653 | self.offsetText.set_position((x, y)) |
| 2654 | |
| 2655 | def set_ticks_position(self, position): |
| 2656 | """ |
nothing calls this directly
no test coverage detected