problem with contour() & basemap; contours overlapping map

Pablo Romero <romero619@...32...> writes:

How can I go about correcting this, so that the 'basemap.contour()'
function draws the contours BEFORE drawing the coastlines & filled
continents?

Use appropriate zorder arguments in your method calls:

http://matplotlib.sourceforge.net/examples/pylab_examples/zorder_demo.html

···

--
Jouni K. Sepp�nen
http://www.iki.fi/jks

Jouni K. Seppänen wrote:

Pablo Romero <romero619@...32...> writes:

How can I go about correcting this, so that the 'basemap.contour()'
function draws the contours BEFORE drawing the coastlines & filled
continents?

Use appropriate zorder arguments in your method calls:

http://matplotlib.sourceforge.net/examples/pylab_examples/zorder_demo.html

Contour does not pass on the zorder argument, so you need to do something like this:

CS = contour(x,y,z, levs)
for c in CS.collections:
     c.set_zorder(0.5) # less than patch, which is 1.0

Eric

Thanks,
Its good to know that it IS possible to set the Z-order for contours (I didnt think it was possible).

In any case, I solved this by setting the Z-order in my fillcontinents() and drawcoastlines() calls, and setting them to '100' and '101' respectively (assuming these numbers were high enough to overlap anything else on the plot).

Thanks again,
P.Romero

···

----------------------------------------

Date: Mon, 16 Mar 2009 21:06:18 -1000
From: efiring@...202...
To: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] problem with contour() & basemap; contours overlapping map

Jouni K. Seppänen wrote:

Pablo Romero writes:

How can I go about correcting this, so that the 'basemap.contour()'
function draws the contours BEFORE drawing the coastlines & filled
continents?

Use appropriate zorder arguments in your method calls:

http://matplotlib.sourceforge.net/examples/pylab_examples/zorder_demo.html

Contour does not pass on the zorder argument, so you need to do
something like this:

CS = contour(x,y,z, levs)
for c in CS.collections:
c.set_zorder(0.5) # less than patch, which is 1.0

Eric

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

_________________________________________________________________
Windows Live™: Life without walls.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009