contours negative dashed, positive solid, zero thick

From: James Boyle <boyle5_at_nyahnyahspammersnyahnyah>
Date: Wed, 20 Oct 2004 11:12:36 -0700

A very basic plot: stereographic, (90N, 270E) contours of psl anomaly
every 8 mb, negative dashed, positive solid, zero thicker or not
plotted.

How do I do this?

I can get everything up to manipulating the line patterns of the
contour lines. Using Dennis Shea's GSUN code, i can see that I need to
set the patterns for each line. I managed to get the contour levels by
the following lines of code:

map = Ngl.contour_map(wks,pslAnom,resources)
levels = Ngl.get_float_array(map.contour,"cnLevels")

then I tried to set some resources:

cnLineDashPatterns = N.zeros((len(levels),), N.Float)
cnLineThicknesses = N.ones((len(levels),), N.Float)
for i in range(len(levels)):
     if levels[i] < 0.:
        cnLineDashPatterns[i] = 1
     elif levels[i] > 0.:
        cnLineDashPatterns[i] = 0
     else:
        cnLineDashPatterns[i] = 0
        cnLineThicknesses[i] = 3
resources.cnLineThicknesses = cnLineThicknesses
resource.cnLineDashPatterns = cnLineDashPatterns
resources.cnLineDashPatterns = cnLineDashPatterns
map = Ngl.contour_map(wks,pslAnom,resources)

But this did not seem to work - so how do you do it?

--Jim

_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Wed Oct 20 2004 - 12:13:00 MDT

This archive was generated by hypermail 2.2.0 : Thu Jan 19 2006 - 21:30:16 MST