Return the x extents in projected coordinates for cartopy. Returns: :obj:`list`: A pair of [xmin, xmax]. See Also: :mod:`cartopy`, :mod:`matplotlib`
(self, geobounds)
| 312 | nadgrids="@null")) |
| 313 | |
| 314 | def cartopy_xlim(self, geobounds): |
| 315 | """Return the x extents in projected coordinates for cartopy. |
| 316 | |
| 317 | Returns: |
| 318 | |
| 319 | :obj:`list`: A pair of [xmin, xmax]. |
| 320 | |
| 321 | See Also: |
| 322 | |
| 323 | :mod:`cartopy`, :mod:`matplotlib` |
| 324 | |
| 325 | """ |
| 326 | try: |
| 327 | _ = len(geobounds) |
| 328 | except TypeError: |
| 329 | x_extents = self._cart_extents(geobounds)[0] |
| 330 | else: |
| 331 | extents = self._cart_extents(geobounds) |
| 332 | x_extents = np.empty(extents.shape, np.object) |
| 333 | |
| 334 | for idxs, extent in np.ndenumerate(extents): |
| 335 | x_extents[idxs] = extent[0] |
| 336 | |
| 337 | return x_extents |
| 338 | |
| 339 | def cartopy_ylim(self, geobounds): |
| 340 | """Return the y extents in projected coordinates for cartopy. |