Return the aspect ratio of the scaled data. Notes ----- This method is intended to be overridden by new projection types.
(self)
| 1949 | self.stale = True |
| 1950 | |
| 1951 | def get_data_ratio(self): |
| 1952 | """ |
| 1953 | Return the aspect ratio of the scaled data. |
| 1954 | |
| 1955 | Notes |
| 1956 | ----- |
| 1957 | This method is intended to be overridden by new projection types. |
| 1958 | """ |
| 1959 | txmin, txmax = self.xaxis.get_transform().transform(self.get_xbound()) |
| 1960 | tymin, tymax = self.yaxis.get_transform().transform(self.get_ybound()) |
| 1961 | xsize = max(abs(txmax - txmin), 1e-30) |
| 1962 | ysize = max(abs(tymax - tymin), 1e-30) |
| 1963 | return ysize / xsize |
| 1964 | |
| 1965 | def apply_aspect(self, position=None): |
| 1966 | """ |
no test coverage detected