Re: resource: cnLevels

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Mon, 24 Sep 2007 11:38:33 -0600

Hi Marc,

When cnLevelSelectionMode = "AutomaticLevels", cnLevelSpacingF,
cnMinLevelValF, and cnMaxLevelValF are all set automatically by
ContourPlot according to the documentation. However, the documentation
also says that cnLevels is also set by ContourPlot.. So you should be
able to retrieve all four of those resources...

Are you trying to get at the cnLevels attribute by doing something like
this?

plot = gsn_csm_contour_map(wks,arr,res)
getvalues plot
   "cnLevels" : contours
end getvalues
print(contours)

I would think that this would work regardless of whether you explicitly
set any of the four resources stated above.... (But there is a chance I
am wrong on that...)
Adam

marc wrote:
> Hello all,
> I believe what I am looking for are the values contained within the
> cnLevels array, but can't seem to get them to print. I receive an error
> which informs me the cnLevels attribute is undefined, however the on
> line documentation indicates the array would be set by ContourPlot
> unless set explicitly, which I prefer not to do. For completeness,
> maybe I've misread the documentation and cnLevels isn't what I want.
> I've used ncl to generate a color plot of a geographic region. I also
> have point data associated with the same region. Both the plot and the
> point data concern concentrations of gases. I need to insure that a
> point which geographically falls within a green region on the plot will
> be colored the same color green when the concentration for the point is
> between the high and low values used to generate the green region of the
> plot. Because the scale of the data may vary significantly, I do not
> want to explicitly set the values. I prefer to let the
> "AutomaticLevels" parameter of the "cnLevelSelectionMode" resource find
> an appropriate color scale, then use that scale to color the points.
>
> Thank you,
> Marc Nackowiz
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Sep 24 2007 - 11:38:33 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 24 2007 - 11:44:39 MDT