Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions lib/mpl_toolkits/basemap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,15 +435,13 @@ def _transform(plotfunc):
@functools.wraps(plotfunc)
def with_transform(self,x,y,data,*args,**kwargs):
# input coordinates are latitude/longitude, not map projection coords.
if kwargs.get('latlon', False):
if kwargs.pop('latlon', False):
# shift data to map projection region for
# cylindrical and pseudo-cylindrical projections.
if self.projection in _cylproj or self.projection in _pseudocyl:
x, data = self.shiftdata(x, data)
# convert lat/lon coords to map projection coords.
x, y = self(x,y)
# delete this keyword so it's not passed on to matplotlib.
del kwargs['latlon']
return plotfunc(self,x,y,data,*args,**kwargs)
return with_transform

Expand All @@ -454,16 +452,14 @@ def _transformuv(plotfunc):
@functools.wraps(plotfunc)
def with_transform(self,x,y,u,v,*args,**kwargs):
# input coordinates are latitude/longitude, not map projection coords.
if kwargs.get('latlon', False):
if kwargs.pop('latlon', False):
# shift data to map projection region for
# cylindrical and pseudo-cylindrical projections.
if self.projection in _cylproj or self.projection in _pseudocyl:
x1, u = self.shiftdata(x, u)
x, v = self.shiftdata(x, v)
# convert lat/lon coords to map projection coords.
x, y = self(x,y)
# delete this keyword so it's not passed on to matplotlib.
del kwargs['latlon']
return plotfunc(self,x,y,u,v,*args,**kwargs)
return with_transform

Expand Down