@@ -3910,28 +3910,28 @@ def drawlsmask(self,land_color="0.8",ocean_color="w",lsmask=None,
39103910 # read in land/sea mask.
39113911 lsmask_lons , lsmask_lats , lsmask = \
39123912 _readlsmask (lakes = lakes ,resolution = resolution ,grid = grid )
3913- # instance variable lsmask is set on first invocation,
3914- # it contains the land-sea mask interpolated to the native
3915- # projection grid. Further calls to drawlsmask will not
3916- # redo the interpolation (unless a new land-sea mask is passed
3917- # in via the lsmask, lsmask_lons, lsmask_lats keywords).
3918-
3919- # is it a cylindrical projection whose limits lie
3920- # outside the limits of the image?
3921- cylproj = self .projection in _cylproj and \
3922- (self .urcrnrlon > lsmask_lons [- 1 ] or \
3923- self .llcrnrlon < lsmask_lons [0 ])
3924- if cylproj :
3925- # stack grids side-by-side (in longitiudinal direction), so
3926- # any range of longitudes may be plotted on a world map.
3927- # in versions of NumPy later than 1.10.0, concatenate will
3928- # not stack these arrays as expected. If axis 1 is outside
3929- # the dimensions of the array, concatenate will now raise
3930- # an IndexError. Using hstack instead.
3931- lsmask_lons = \
3932- np .hstack ((lsmask_lons ,lsmask_lons [1 :] + 360 ))
3933- lsmask = \
3934- np .hstack ((lsmask ,lsmask [:,1 :]))
3913+ # instance variable lsmask is set on first invocation,
3914+ # it contains the land-sea mask interpolated to the native
3915+ # projection grid. Further calls to drawlsmask will not
3916+ # redo the interpolation (unless a new land-sea mask is passed
3917+ # in via the lsmask, lsmask_lons, lsmask_lats keywords).
3918+
3919+ # is it a cylindrical projection whose limits lie
3920+ # outside the limits of the image?
3921+ cylproj = self .projection in _cylproj and \
3922+ (self .urcrnrlon > lsmask_lons [- 1 ] or \
3923+ self .llcrnrlon < lsmask_lons [0 ])
3924+ if cylproj :
3925+ # stack grids side-by-side (in longitiudinal direction), so
3926+ # any range of longitudes may be plotted on a world map.
3927+ # in versions of NumPy later than 1.10.0, concatenate will
3928+ # not stack these arrays as expected. If axis 1 is outside
3929+ # the dimensions of the array, concatenate will now raise
3930+ # an IndexError. Using hstack instead.
3931+ lsmask_lons = \
3932+ np .hstack ((lsmask_lons ,lsmask_lons [1 :] + 360 ))
3933+ lsmask = \
3934+ np .hstack ((lsmask ,lsmask [:,1 :]))
39353935 else :
39363936 if lakes : lsmask = np .where (lsmask == 2 ,np .array (0 ,np .uint8 ),lsmask )
39373937
0 commit comments