[ncl-talk] draw filled markers with different colors for markers' boundaries

Sha Feng sfeng at mail.usf.edu
Fri Dec 1 11:38:04 MST 2017


Both works!Thank you both for sharing the scripts.

-Sha

> On Dec 1, 2017, at 1:16 PM, Carl Schreck <cjschrec at ncsu.edu> wrote:
> 
> Yeah, I typically use thickness of 3 to get the outline and then overlay with the same thing but a thickness of 1. For example: 
>       res at xyMarkerColor = "black"
>       res at xyMarkerThicknessF = 3
>       res at xyMarker = NhlNewMarker( io_wks, "s", 37, 0, 0, 1, 1, 0 )
>       xy = gsn_csm_xy( io_wks, xData, yData, res )
>       overlay( io_plot, xy )
> 
>       res at xyMarkerColor = "red3"
>       res at xyMarkerThicknessF = 1
>       res at xyMarker = NhlNewMarker( io_wks, "s", 37, 0, 0, 1, 1, 0 )
>       xy = gsn_csm_xy( io_wks, xData, yData, res )
>       overlay( io_plot, xy )
> 
> That produces the hurricane symbols in the attached image.
> 
> CArl
> 
> On Fri, Dec 1, 2017 at 1:10 PM, Adam Phillips <asphilli at ucar.edu <mailto:asphilli at ucar.edu>> wrote:
> Hi Sha,
> I have accomplished this by drawing a set of filled markers first (say a filled circle #16), then drawing the exact same markers but this time use an 
> unfilled version (hollow circle #4). As a simplified example:
> res = True
> res at gsnDraw  = False
> res at gsnFrame = False
> ...
> res at xyMarkerColor = "black"
> res at xyMarker = 16
> plot = gsn_csm_xy(wks,time,arr,res)
> res at xyMarker = 4
> res at xyMarkerColor = "red"
> plot2 = gsn_csm_xy(wks,time,arr,res)
> overlay(plot,plot2)
> draw(plot)
> frame(wks)
> 
> You may have to alter the thickness or size of the markers (using xyMarkerSizeF or xyMarkerThicknessF), but the above should get you started down 
> the right path.
> 
> Hope that helps. If you have any further questions please respond to the ncl-talk email list.
> Adam
> 
> On Fri, Dec 1, 2017 at 9:41 AM, Sha Feng <sfeng at mail.usf.edu <mailto:sfeng at mail.usf.edu>> wrote:
> Hi NCL talkers,
> 
> I wonder if anyone knows how to draw filled markers with different colors for markers’ boundaries.
> 
> Thanks,
> -Sha
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
> 
> 
> 
> -- 
> Adam Phillips 
> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/ <http://www.cgd.ucar.edu/staff/asphilli/>   303-497-1726 <tel:(303)%20497-1726>
> 
>  <http://www.cgd.ucar.edu/staff/asphilli>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
> 
> 
> 
> 
> -- 
> 
>  <https://ncics.org/>	Carl J. Schreck III, PhD
> Research Scholar
> North Carolina State University <http://ncsu.edu/>
> North Carolina Institute for Climate Studies (NCICS) <https://ncics.org/>
> 151 Patton Ave, Asheville, NC 28801
> e: cjschrec at ncsu.edu <mailto:cjschrec at ncsu.edu>
> o: +1 828 257 3140 <tel:(828)%20257-3140>
> c: +1 828 484 1702 <tel:(828)%20484-1702>
> Publications <http://scholar.google.com/citations?hl=en&user=th8ONEcAAAAJ&view_op=list_works&sortby=pubdate>
> ncics.org/mjo <https://ncics.org/mjo/>
> CycloneCenter.org <https://www.cyclonecenter.org/>
> <chi200.cfs.eqtr.png>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171201/2317253e/attachment.html>


More information about the ncl-talk mailing list