@@ -505,6 +505,8 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
505505 self .boundinglat = boundinglat
506506 # is a round pole-centered plot desired?
507507 self .round = round
508+ # full disk projection?
509+ self ._fulldisk = False # default value
508510
509511 # set up projection parameter dict.
510512 projparams = {}
@@ -1378,6 +1380,13 @@ def _getmapboundary(self):
13781380 n = n + 1
13791381 self .boundarylonmin = lons .min ()
13801382 self .boundarylonmax = lons .max ()
1383+ # for circular full disk projections where boundary is
1384+ # a latitude circle, set boundarylonmax and boundarylonmin
1385+ # to cover entire world (so parallels will be drawn).
1386+ if self ._fulldisk and \
1387+ np .abs (self .boundarylonmax - self .boundarylonmin ) < 1. :
1388+ self .boundarylonmin = - 180.
1389+ self .boundarylonmax = 180.
13811390 b = np .empty ((len (lons ),2 ),np .float64 )
13821391 b [:,0 ] = lons ; b [:,1 ] = lats
13831392 boundaryll = _geoslib .Polygon (b )
@@ -3083,6 +3092,8 @@ def pcolor(self,x,y,data,**kwargs):
30833092 x = np .compress (mask ,x )
30843093 y = np .compress (mask ,y )
30853094 data = np .compress (mask ,data )
3095+ # delete this keyword so it's not pass on to pcolor.
3096+ del kwargs ['tri' ]
30863097 if masked :
30873098 triang = tri .Triangulation (x , y )
30883099 z = data [triang .triangles ]
@@ -3091,8 +3102,6 @@ def pcolor(self,x,y,data,**kwargs):
30913102 ret = ax .tripcolor (triang ,data ,** kwargs )
30923103 else :
30933104 ret = ax .tripcolor (x ,y ,data ,** kwargs )
3094- # delete this keyword so it's not pass on to pcolor.
3095- del kwargs ['tri' ]
30963105 else :
30973106 # make x,y masked arrays
30983107 # (masked where data is outside of projection limb)
@@ -3249,6 +3258,8 @@ def contour(self,x,y,data,*args,**kwargs):
32493258 x = np .compress (mask ,x )
32503259 y = np .compress (mask ,y )
32513260 data = np .compress (mask ,data )
3261+ # delete this keyword so it's not pass on to pcolor.
3262+ del kwargs ['tri' ]
32523263 if masked :
32533264 triang = tri .Triangulation (x , y )
32543265 z = data [triang .triangles ]
@@ -3457,6 +3468,11 @@ def streamplot(self, x, y, u, v, *args, **kwargs):
34573468
34583469 Other \*args and \**kwargs passed on to matplotlib.pyplot.streamplot.
34593470 """
3471+ if _matplotlib_version < '1.2' :
3472+ msg = dedent ("""
3473+ streamplot method requires matplotlib 1.2 or higher,
3474+ you have %s""" % _matplotlib_version )
3475+ raise NotImplementedError (msg )
34603476 ax , plt = self ._ax_plt_from_kw (kwargs )
34613477 # allow callers to override the hold state by passing hold=True|False
34623478 b = ax .ishold ()
0 commit comments