Removing continents

Mauro Cavalcanti wrote:

Dear Jeff,

2008/12/13 Jeff Whitaker <jswhit@...146...>:
  

Mauro: That's a bug - the fillcontinents method was only returning the last
Polygon instance drawn. I've fixed it in SVN (r6579) to return a list of
all the Polygon instances. You can now iterate over that list and remove
each Polygon, like this
contpolys = m.fillcontinents()
for contpoly in contpolys:
  contpoly.remove()
    
In my application, it didn't work.

Mauro: Did you update from SVN? If so, can be more specific about what didn't work? The return value of fillcontinents should be a list of Polygon instances, each with a remove method.

But I just figured out that a much
simpler solution is to call ax.cla() (brute force, isn't it? :))

That deletes everything, not just the continent polygons. I don't think you want to do that. Removing just the continent Polygons should work if you have the latest SVN revision (0.99.3). Let's figure out why that's not working for you.

-Jeff

···

and
then call the Blue Marble drawing routine (err, method... I sometimes
miss the old and good FORTRAN times...). The problem with this
paleolitic approach is that by clearing the axis first, I lost all the
points and trees I have plotted on the map... :(. I will have to work
this out, because I have the same problem with other Basemap methods
in my application (for example, if I want to draw the map in different
resolutions, or on different projections).

Thanks for the bug report.
    
Well, I even didn't know that it was a bug!

With warmest regards,

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328