2727from matplotlib .patches import Ellipse , Circle , Polygon , FancyArrowPatch
2828from matplotlib .lines import Line2D
2929from matplotlib .transforms import Bbox
30- from mpl_toolkits . basemap import pyproj
30+ from . import pyproj
3131from mpl_toolkits .axes_grid1 import make_axes_locatable
3232from matplotlib .image import imread
3333import sys , os , math
@@ -712,7 +712,7 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
712712 self .urcrnrlon = urcrnrlon ; self .urcrnrlat = urcrnrlat
713713 else :
714714 if width is None or height is None :
715- raise ValueError ('must either specify lat/lon values of corners (llcrnrlon,llcrnrlat,ucrnrlon ,urcrnrlat) in degrees or width and height in meters' )
715+ raise ValueError ('must either specify lat/lon values of corners (llcrnrlon,llcrnrlat,urcrnrlon ,urcrnrlat) in degrees or width and height in meters' )
716716 if lon_0 is None or lat_0 is None :
717717 raise ValueError ('must specify lon_0 and lat_0 when using width, height to specify projection region' )
718718 llcrnrlon ,llcrnrlat ,urcrnrlon ,urcrnrlat = _choosecorners (width ,height ,** projparams )
@@ -725,7 +725,7 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
725725 raise ValueError ('must specify lat_0 and lon_0 for Stereographic basemap (lat_ts is optional)' )
726726 if not using_corners :
727727 if width is None or height is None :
728- raise ValueError ('must either specify lat/lon values of corners (llcrnrlon,llcrnrlat,ucrnrlon ,urcrnrlat) in degrees or width and height in meters' )
728+ raise ValueError ('must either specify lat/lon values of corners (llcrnrlon,llcrnrlat,urcrnrlon ,urcrnrlat) in degrees or width and height in meters' )
729729 if lon_0 is None or lat_0 is None :
730730 raise ValueError ('must specify lon_0 and lat_0 when using width, height to specify projection region' )
731731 llcrnrlon ,llcrnrlat ,urcrnrlon ,urcrnrlat = _choosecorners (width ,height ,** projparams )
@@ -762,7 +762,7 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
762762 raise ValueError ('must specify lat_0 and lon_0 for Lambert Azimuthal basemap' )
763763 if not using_corners :
764764 if width is None or height is None :
765- raise ValueError ('must either specify lat/lon values of corners (llcrnrlon,llcrnrlat,ucrnrlon ,urcrnrlat) in degrees or width and height in meters' )
765+ raise ValueError ('must either specify lat/lon values of corners (llcrnrlon,llcrnrlat,urcrnrlon ,urcrnrlat) in degrees or width and height in meters' )
766766 if lon_0 is None or lat_0 is None :
767767 raise ValueError ('must specify lon_0 and lat_0 when using width, height to specify projection region' )
768768 llcrnrlon ,llcrnrlat ,urcrnrlon ,urcrnrlat = _choosecorners (width ,height ,** projparams )
@@ -777,7 +777,7 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
777777 raise ValueError ('must specify lat_0 and lon_0 for Transverse Mercator, Gnomonic, Cassini-Soldnerr and Polyconic basemap' )
778778 if not using_corners :
779779 if width is None or height is None :
780- raise ValueError ('must either specify lat/lon values of corners (llcrnrlon,llcrnrlat,ucrnrlon ,urcrnrlat) in degrees or width and height in meters' )
780+ raise ValueError ('must either specify lat/lon values of corners (llcrnrlon,llcrnrlat,urcrnrlon ,urcrnrlat) in degrees or width and height in meters' )
781781 if lon_0 is None or lat_0 is None :
782782 raise ValueError ('must specify lon_0 and lat_0 when using width, height to specify projection region' )
783783 llcrnrlon ,llcrnrlat ,urcrnrlon ,urcrnrlat = _choosecorners (width ,height ,** projparams )
@@ -871,7 +871,7 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
871871 # raise ValueError, 'cannot specify map region with width and height keywords for this projection, please specify lat/lon values of corners'
872872 if not using_corners :
873873 if width is None or height is None :
874- raise ValueError ('must either specify lat/lon values of corners (llcrnrlon,llcrnrlat,ucrnrlon ,urcrnrlat) in degrees or width and height in meters' )
874+ raise ValueError ('must either specify lat/lon values of corners (llcrnrlon,llcrnrlat,urcrnrlon ,urcrnrlat) in degrees or width and height in meters' )
875875 if lon_0 is None or lat_0 is None :
876876 raise ValueError ('must specify lon_0 and lat_0 when using width, height to specify projection region' )
877877 llcrnrlon ,llcrnrlat ,urcrnrlon ,urcrnrlat = _choosecorners (width ,height ,** projparams )
@@ -4190,7 +4190,7 @@ def warpimage(self,image="bluemarble",scale=None,**kwargs):
41904190 # to map projection coords.
41914191 # if masked=True, values outside of
41924192 # projection limb will be masked.
4193- for k in range (3 ):
4193+ for k in range (self . _bm_rgba . shape [ 2 ] ):
41944194 self ._bm_rgba_warped [:,:,k ],x ,y = \
41954195 self .transform_scalar (self ._bm_rgba [:,:,k ],\
41964196 self ._bm_lons ,self ._bm_lats ,nx ,ny ,returnxy = True )
0 commit comments