Update the subplot position from ``figure.subplotpars``.
(self, figure)
| 656 | return self.colspan.stop == self.get_gridspec().ncols |
| 657 | |
| 658 | def get_position(self, figure): |
| 659 | """ |
| 660 | Update the subplot position from ``figure.subplotpars``. |
| 661 | """ |
| 662 | gridspec = self.get_gridspec() |
| 663 | nrows, ncols = gridspec.get_geometry() |
| 664 | rows, cols = np.unravel_index([self.num1, self.num2], (nrows, ncols)) |
| 665 | fig_bottoms, fig_tops, fig_lefts, fig_rights = \ |
| 666 | gridspec.get_grid_positions(figure) |
| 667 | |
| 668 | fig_bottom = fig_bottoms[rows].min() |
| 669 | fig_top = fig_tops[rows].max() |
| 670 | fig_left = fig_lefts[cols].min() |
| 671 | fig_right = fig_rights[cols].max() |
| 672 | return Bbox.from_extents(fig_left, fig_bottom, fig_right, fig_top) |
| 673 | |
| 674 | def get_topmost_subplotspec(self): |
| 675 | """ |
no test coverage detected