[ncl-talk] multiple color markers with single array data (XY plot)

Karin Meier-Fleischer meier-fleischer at dkrz.de
Fri Jul 19 09:00:01 MDT 2019


Hi SB,

to use two different markers with different colors set the resources of 
xyMarkLineModes and xyMarkers like below.

   res at xyMarkLineModes  = *(/"Markers","Markers"/)* ;-- set mark line 
mode for both variables
   res at xyMarker*s*        = (/ 10, 16/) ;-- choose marker types
   res at xyMarkerColors   = (/"red","blue"/)          ;-- choose marker colors

-Karin

Am 19.07.19 um 16:41 schrieb S Br via ncl-talk:
> Hi All,
> Is it possible to draw markers with different color in a XY plot. I am 
> trying as given below but doesn't work.
>
> Thanks.
> SB
>
> x = (/0.205, 0.280, 0.211, 0.229, 0.283, 2.141, 2.160/)
> y = (/0.155, 0.050, 0.151, 0.159, 0.053, 0.151, 0.150/)
>
>  res at xyMarkLineModes     = "Markers"
>    res at xyMarker            = 9
>    res at xyMarkerSizeF       = 0.02                        ; default 0.01
>    res at xyMarkerThicknessF  = 2.0                         ; default 1.00
>    res at xyMarkerColors         =  (/ "green4", "red", "blue", "orange", \
>                                    "cyan2", "darkorchid2", "brown"/)
>
>    plot                    = gsn_csm_xy (wks,x,y,res)
>
> draw(plot)
> frame(wks)
> end
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190719/18e1b1ea/attachment.html>


More information about the ncl-talk mailing list