I am encountering the same problem with fillcontinents that has been
discussed here in the past:
https://sourceforge.net/mailarchive/message.php?msg_id=22351355
I am using Basemap 1.0 in Python 2.4.3.

fillcontinents sometimes fails and the entire map is the assigned ocean
color, aqua. Jeff Whitaker suggested that I try drawlsmask or bluemarble
methods of Basemap. Neither of these have worked for me, as explained below
...

We do not have PIL (Python Image Library) installed and it is required for
bluemarble and I don't have authority to install, so for now bluemarble
cannot be used.

Drawlsmask raises "ValueError: lons and lats must be increasing!". But they
are increasing - here is an attempt to make a global map:
m = Basemap(llcrnrlat=-85.0,llcrnrlon=0.0,urcrnrlat=85.0,urcrnrlon=360.0)
m.drawlsmask()
And this throws ValueError (so do other proper lat-long boundaries).

So back to the problem with fillcontinents ...
I have no problem on my development system - all maps are so far good. But
on our operational system, some combinations of lat-long and figure size
cause fillcontinents (or something else?) to fail.

The original code reads like this:
m = Basemap(llcrnrlat=-85.0,llcrnrlon=0.0,urcrnrlat=85.0,urcrnrlon=360.0) #
global map, it is OK
m.drawcoastlines()
m.drawcountries(linewidth=1)
m.drawmapboundary(fill_color='aqua')
m.fillcontinents(color='coral')

BTW, here are values that make it fail for me (north Atlantic region):
m = Basemap(llcrnrlat=10.0,llcrnrlon=-100.0,urcrnrlat=70.0,urcrnrlon=15.0)
and
plt.figure(figsize=(2.0,1.043478))
If I shrink lat-lon boundaries by 1 degree (11,-99)(69,14) or change the
figsize somewhat (but maintain aspect ratio), the continents will appear.

If fillcontinents is the problem, then if I comment it out, shouldn't I get
coastlines and countries (line drawings shouldn't be a problem)? I do on my
dev system, but I still get solid 'aqua' on the operational system.




------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to