|
17 | 17 | import matplotlib.spines as mspines |
18 | 18 | import matplotlib.axis as maxis |
19 | 19 | from matplotlib.ticker import Formatter, Locator, NullLocator, FixedLocator, NullFormatter |
20 | | -from matplotlib.transforms import Affine2D, Affine2DBase, Bbox, \ |
21 | | - BboxTransformTo, IdentityTransform, Transform, TransformWrapper |
| 20 | +from matplotlib.transforms import Affine2D, BboxTransformTo, Transform |
22 | 21 |
|
23 | 22 | class GeoAxes(Axes): |
24 | 23 | """ |
@@ -268,6 +267,11 @@ def __init__(self, resolution): |
268 | 267 | Transform.__init__(self) |
269 | 268 | self._resolution = resolution |
270 | 269 |
|
| 270 | + def __str__(self): |
| 271 | + return "{}({})".format(type(self).__name__, self._resolution) |
| 272 | + |
| 273 | + __repr__ = __str__ |
| 274 | + |
271 | 275 | def transform_non_affine(self, ll): |
272 | 276 | longitude = ll[:, 0:1] |
273 | 277 | latitude = ll[:, 1:2] |
@@ -308,6 +312,11 @@ def __init__(self, resolution): |
308 | 312 | Transform.__init__(self) |
309 | 313 | self._resolution = resolution |
310 | 314 |
|
| 315 | + def __str__(self): |
| 316 | + return "{}({})".format(type(self).__name__, self._resolution) |
| 317 | + |
| 318 | + __repr__ = __str__ |
| 319 | + |
311 | 320 | def transform_non_affine(self, xy): |
312 | 321 | # MGDTODO: Math is hard ;( |
313 | 322 | return xy |
@@ -347,6 +356,11 @@ def __init__(self, resolution): |
347 | 356 | Transform.__init__(self) |
348 | 357 | self._resolution = resolution |
349 | 358 |
|
| 359 | + def __str__(self): |
| 360 | + return "{}({})".format(type(self).__name__, self._resolution) |
| 361 | + |
| 362 | + __repr__ = __str__ |
| 363 | + |
350 | 364 | def transform_non_affine(self, ll): |
351 | 365 | longitude = ll[:, 0:1] |
352 | 366 | latitude = ll[:, 1:2] |
@@ -381,6 +395,11 @@ def __init__(self, resolution): |
381 | 395 | Transform.__init__(self) |
382 | 396 | self._resolution = resolution |
383 | 397 |
|
| 398 | + def __str__(self): |
| 399 | + return "{}({})".format(type(self).__name__, self._resolution) |
| 400 | + |
| 401 | + __repr__ = __str__ |
| 402 | + |
384 | 403 | def transform_non_affine(self, xy): |
385 | 404 | x, y = xy.T |
386 | 405 | z = np.sqrt(1 - (x / 4) ** 2 - (y / 2) ** 2) |
@@ -423,6 +442,11 @@ def __init__(self, resolution): |
423 | 442 | Transform.__init__(self) |
424 | 443 | self._resolution = resolution |
425 | 444 |
|
| 445 | + def __str__(self): |
| 446 | + return "{}({})".format(type(self).__name__, self._resolution) |
| 447 | + |
| 448 | + __repr__ = __str__ |
| 449 | + |
426 | 450 | def transform_non_affine(self, ll): |
427 | 451 | def d(theta): |
428 | 452 | delta = -(theta + np.sin(theta) - pi_sin_l) / (1 + np.cos(theta)) |
@@ -476,6 +500,11 @@ def __init__(self, resolution): |
476 | 500 | Transform.__init__(self) |
477 | 501 | self._resolution = resolution |
478 | 502 |
|
| 503 | + def __str__(self): |
| 504 | + return "{}({})".format(type(self).__name__, self._resolution) |
| 505 | + |
| 506 | + __repr__ = __str__ |
| 507 | + |
479 | 508 | def transform_non_affine(self, xy): |
480 | 509 | x = xy[:, 0:1] |
481 | 510 | y = xy[:, 1:2] |
@@ -525,6 +554,11 @@ def __init__(self, center_longitude, center_latitude, resolution): |
525 | 554 | self._center_longitude = center_longitude |
526 | 555 | self._center_latitude = center_latitude |
527 | 556 |
|
| 557 | + def __str__(self): |
| 558 | + return "{}({})".format(type(self).__name__, self._resolution) |
| 559 | + |
| 560 | + __repr__ = __str__ |
| 561 | + |
528 | 562 | def transform_non_affine(self, ll): |
529 | 563 | longitude = ll[:, 0:1] |
530 | 564 | latitude = ll[:, 1:2] |
@@ -572,6 +606,11 @@ def __init__(self, center_longitude, center_latitude, resolution): |
572 | 606 | self._center_longitude = center_longitude |
573 | 607 | self._center_latitude = center_latitude |
574 | 608 |
|
| 609 | + def __str__(self): |
| 610 | + return "{}({})".format(type(self).__name__, self._resolution) |
| 611 | + |
| 612 | + __repr__ = __str__ |
| 613 | + |
575 | 614 | def transform_non_affine(self, xy): |
576 | 615 | x = xy[:, 0:1] |
577 | 616 | y = xy[:, 1:2] |
|
0 commit comments