27
27
from matplotlib .patches import Ellipse , Circle , Polygon , FancyArrowPatch
28
28
from matplotlib .lines import Line2D
29
29
from matplotlib .transforms import Bbox
30
- from mpl_toolkits . basemap import pyproj
30
+ from . import pyproj
31
31
from mpl_toolkits .axes_grid1 import make_axes_locatable
32
32
from matplotlib .image import imread
33
33
import sys , os , math
@@ -712,7 +712,7 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
712
712
self .urcrnrlon = urcrnrlon ; self .urcrnrlat = urcrnrlat
713
713
else :
714
714
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' )
716
716
if lon_0 is None or lat_0 is None :
717
717
raise ValueError ('must specify lon_0 and lat_0 when using width, height to specify projection region' )
718
718
llcrnrlon ,llcrnrlat ,urcrnrlon ,urcrnrlat = _choosecorners (width ,height ,** projparams )
@@ -725,7 +725,7 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
725
725
raise ValueError ('must specify lat_0 and lon_0 for Stereographic basemap (lat_ts is optional)' )
726
726
if not using_corners :
727
727
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' )
729
729
if lon_0 is None or lat_0 is None :
730
730
raise ValueError ('must specify lon_0 and lat_0 when using width, height to specify projection region' )
731
731
llcrnrlon ,llcrnrlat ,urcrnrlon ,urcrnrlat = _choosecorners (width ,height ,** projparams )
@@ -762,7 +762,7 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
762
762
raise ValueError ('must specify lat_0 and lon_0 for Lambert Azimuthal basemap' )
763
763
if not using_corners :
764
764
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' )
766
766
if lon_0 is None or lat_0 is None :
767
767
raise ValueError ('must specify lon_0 and lat_0 when using width, height to specify projection region' )
768
768
llcrnrlon ,llcrnrlat ,urcrnrlon ,urcrnrlat = _choosecorners (width ,height ,** projparams )
@@ -777,7 +777,7 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
777
777
raise ValueError ('must specify lat_0 and lon_0 for Transverse Mercator, Gnomonic, Cassini-Soldnerr and Polyconic basemap' )
778
778
if not using_corners :
779
779
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' )
781
781
if lon_0 is None or lat_0 is None :
782
782
raise ValueError ('must specify lon_0 and lat_0 when using width, height to specify projection region' )
783
783
llcrnrlon ,llcrnrlat ,urcrnrlon ,urcrnrlat = _choosecorners (width ,height ,** projparams )
@@ -871,7 +871,7 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
871
871
# raise ValueError, 'cannot specify map region with width and height keywords for this projection, please specify lat/lon values of corners'
872
872
if not using_corners :
873
873
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' )
875
875
if lon_0 is None or lat_0 is None :
876
876
raise ValueError ('must specify lon_0 and lat_0 when using width, height to specify projection region' )
877
877
llcrnrlon ,llcrnrlat ,urcrnrlon ,urcrnrlat = _choosecorners (width ,height ,** projparams )
@@ -4190,7 +4190,7 @@ def warpimage(self,image="bluemarble",scale=None,**kwargs):
4190
4190
# to map projection coords.
4191
4191
# if masked=True, values outside of
4192
4192
# projection limb will be masked.
4193
- for k in range (3 ):
4193
+ for k in range (self . _bm_rgba . shape [ 2 ] ):
4194
4194
self ._bm_rgba_warped [:,:,k ],x ,y = \
4195
4195
self .transform_scalar (self ._bm_rgba [:,:,k ],\
4196
4196
self ._bm_lons ,self ._bm_lats ,nx ,ny ,returnxy = True )
0 commit comments