Re: Polymarker's color

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed Jun 16 2010 - 09:47:00 MDT

Hi Agnes,
I think you want to use the gs resources for the polymarkers, and not
the xy resources. Instead of this:
res@xyMarkLineModes = "Markers" ; choose which have markers
res@gsMarkerIndex = 16 ; Marker size
res@xyMarkerColor = "green" ; Marker color

try this:
res@gsMarkerIndex = 16 ; Marker size
res@gsMarkerColor = "green"

See example # 8 here:
http://www.ncl.ucar.edu/Applications/polyg.shtml#ex8
Adam

On 06/16/2010 09:34 AM, Agnes Lim wrote:
> Hi
>
> I had the following piece of code to plot some data points as markers on
> a map.
> However, I ran into issue that changing color of the markers does not
> seem to work on the output.
>
> Could someone point out to me what I had done incorrectly?
>
> Thanks
> Agnes
>
> ============================================================================================
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>
> begin
>
> wks = gsn_open_wks("x11","d01_AIRS_data_location") ;
> open a ps file
> res = True ; plot mods desired
> res@mpProjection = "LambertConformal" ; choose map
> projection
> res@mpFillOn = False ; turn off map fill
> res@mpOutlineBoundarySets = "geophysicalandusstates"; turn on states
> res@mpDataBaseVersion = "mediumres" ; select database
> res@mpDataSetName = "Earth..1"
> res@tiMainString = "Coverage of AIRS data in domain 1"
> res@mpMinLatF = 17 ; min lat to mask
> res@mpMaxLatF = 40 ; max lat to mask
> res@mpMinLonF = -127 ; min lon to mask
> res@mpMaxLonF = -73 ; max lon to mask
>
> res@gsnMaskLambertConformal = True ; turn on lc masking
> res@gsnDraw = False
> res@gsnFrame = False
> plot = gsn_csm_map(wks,res) ; draw satellite proj map
> delete(res)
>
> nrows = 119
> ncols = 2
> data =
> asciiread("/home/alim/DA_analysus_verification/src/domain_1_obs",(/nrows,ncols/),"float")
>
> lat=data(:,0)
> lon=data(:,1)
> res=True
> res@xyMarkLineModes = "Markers" ; choose which have
> markers
> res@gsMarkerIndex = 16 ; Marker size
> res@xyMarkerColor = "green" ; Marker color
>
> cplot = gsn_add_polymarker(wks, plot, lon, lat, res)
> gsnMaximize = True
> draw(plot)
> frame(wks)
>
> end
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
__________________________________________________
Adam Phillips 
asphilli@ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
Climate and Global Dynamics Division         fax: (303) 497-1333
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 Jun 16 09:47:10 2010

This archive was generated by hypermail 2.1.8 : Wed Jun 16 2010 - 15:28:33 MDT