Re: Retrieving a color map?

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 11 2012 - 14:16:29 MDT

Hi Walter,
You can use getvalues to get at the colors:
res = True
....
res@gsnSpreadColors = True
res@gsnDraw = False
res@gsnFrame = False
plot = gsn_csm_contour_map(wks,data,res)

; Retrieve contour levels
   getvalues plot@contour
      "cnFillColors" : color_indexes
   end getvalues
   printVarSummary(color_indexes)

See a previous ncl-talk query here:
http://www.ncl.ucar.edu/Support/talk_archives/2012/0731.html

Adam

On 04/11/2012 12:28 PM, Walter Hannah wrote:
> I'm using gsnSpreadColors with a colormap. I'd like to add markers to a
> plot and coloring them manually depending on the data. To do this I need
> to get the resulting color map that would be used after setting
> gsnSpreadColors, but I can't find a way to do this. Any thoughts?
>
> Walter
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Apr 11 14:16:37 2012

This archive was generated by hypermail 2.1.8 : Fri Apr 13 2012 - 13:37:52 MDT