Convenience method to calculate the aspect ratio of the Axes in the display coordinate system.
(self)
| 9306 | triplot = _make_axes_method(mtri.triplot) |
| 9307 | |
| 9308 | def _get_aspect_ratio(self): |
| 9309 | """ |
| 9310 | Convenience method to calculate the aspect ratio of the Axes in |
| 9311 | the display coordinate system. |
| 9312 | """ |
| 9313 | figure_size = self.get_figure().get_size_inches() |
| 9314 | ll, ur = self.get_position() * figure_size |
| 9315 | width, height = ur - ll |
| 9316 | return height / (width * self.get_data_ratio()) |
no test coverage detected