8000 Fix bugs from incomplete projection rename · proplot-dev/proplot@9099f44 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9099f44

Browse files
committed
Fix bugs from incomplete projection rename
1 parent 732095b commit 9099f44

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

proplot/axes/plot.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,8 @@ def standardize_1d(self, func, *args, autoformat=None, **kwargs):
616616
ys = [_to_ndarray(yi) for yi in ys] # store naked array
617617
kwargs['positions'] = x
618618

619-
# Basemap shift x coordiantes without shifting y, we fix this!
620-
if getattr(self, 'name', '') == 'basemap' and kwargs.get('latlon', None):
619+
# Basemap shift x coordinates without shifting y, we fix this!
620+
if getattr(self, 'name', '') == 'proplot_basemap' and kwargs.get('latlon', None):
621621
ix, iys = x, []
622622
xmin, xmax = self.projection.lonmin, self.projection.lonmax
623623
for y in ys:
@@ -936,7 +936,7 @@ def standardize_2d(
936936

937937
# Cartopy projection axes
938938
if (
939-
getattr(self, 'name', '') == 'cartopy'
939+
getattr(self, 'name', '') == 'proplot_cartopy'
940940
and isinstance(kwargs.get('transform', None), PlateCarree)
941941
):
942942
x, y = _fix_latlon(x, y)
@@ -955,7 +955,7 @@ def standardize_2d(
955955
x, Zs = ix, iZs
956956

957957
# Basemap projection axes
958-
elif getattr(self, 'name', '') == 'basemap' and kwargs.get('latlon', None):
958+
elif getattr(self, 'name', '') == 'proplot_basemap' and kwargs.get('latlon', None):
959959
# Fix grid
960960
xmin, xmax = self.projection.lonmin, self.projection.lonmax
961961
x, y = _fix_latlon(x, y)
@@ -2151,7 +2151,7 @@ def _get_transform(self, transform):
21512151
from cartopy.crs import CRS
21522152
except ModuleNotFoundError:
21532153
CRS = None
2154-
cartopy = getattr(self, 'name', '') == 'cartopy'
2154+
cartopy = getattr(self, 'name', '') == 'proplot_cartopy'
21552155
if (
21562156
isinstance(transform, mtransforms.Transform)
21572157
or CRS and isinstance(transform, CRS)
@@ -4173,7 +4173,7 @@ def _basemap_redirect(func):
41734173

41744174
@functools.wraps(func)
41754175
def wrapper(self, *args, **kwargs):
4176-
if getattr(self, 'name', '') == 'basemap':
4176+
if getattr(self, 'name', '') == 'proplot_basemap':
41774177
return getattr(self.projection, name)(*args, ax=self, **kwargs)
41784178
else:
41794179
return func(self, *args, **kwargs)

0 commit comments

Comments
 (0)
0