@@ -4089,7 +4089,8 @@ def warpimage(self,image="bluemarble",scale=None,**kwargs):
4089
4089
# make points outside projection limb transparent.
4090
4090
self ._bm_rgba_warped = self ._bm_rgba_warped .filled (0. )
4091
4091
# treat pseudo-cyl projections such as mollweide, robinson and sinusoidal.
4092
- elif self .projection in _pseudocyl :
4092
+ elif self .projection in _pseudocyl :
4093
+ if self .projection != 'hammer' :
4093
4094
lonsr ,latsr = self (x ,y ,inverse = True )
4094
4095
mask = ma .zeros ((ny ,nx ,4 ),np .int8 )
4095
4096
lon_0 = self .projparams ['lon_0' ]
@@ -4112,6 +4113,12 @@ def warpimage(self,image="bluemarble",scale=None,**kwargs):
4112
4113
self ._bm_rgba_warped = self ._bm_rgba_warped .filled (0. )
4113
4114
# plot warped rgba image.
4114
4115
im = self .imshow (self ._bm_rgba_warped ,ax = ax ,** kwargs )
4116
+ # for hammer projection, use clip path defined by
4117
+ # projection limb (patch created in drawmapboundary).
4118
+ if self .projection == 'hammer' :
4119
+ if not self ._mapboundarydrawn :
4120
+ self .drawmapboundary (color = 'none' ,linewidth = None )
4121
+ im .set_clip_path (self ._mapboundarydrawn )
4115
4122
else :
4116
4123
# bmproj True, no interpolation necessary.
4117
4124
im = self .imshow (self ._bm_rgba ,ax = ax ,** kwargs )
0 commit comments