()
| 37 | ax.apply_aspect = lambda pos=None: None |
| 38 | |
| 39 | def restore_bbox(): |
| 40 | for ax, loc, aspect in zip(fig.axes, locator_list, old_aspect): |
| 41 | ax.set_axes_locator(loc) |
| 42 | if aspect is sentinel: |
| 43 | # delete our no-op function which un-hides the original method |
| 44 | del ax.apply_aspect |
| 45 | else: |
| 46 | ax.apply_aspect = aspect |
| 47 | |
| 48 | fig.bbox = origBbox |
| 49 | fig.bbox_inches = origBboxInches |
| 50 | fig.transFigure._boxout = _boxout |
| 51 | fig.transFigure.invalidate() |
| 52 | fig.patch.set_bounds(0, 0, 1, 1) |
| 53 | |
| 54 | if fixed_dpi is None: |
| 55 | fixed_dpi = fig.dpi |
no test coverage detected
searching dependent graphs…