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

S Br sbr.climate at gmail.com
Sat Jul 20 01:08:03 MDT 2019


Hi Karin,
I have tried this simple script but still it doesn't work. I can't produce
the markers with different colors.

Thanks.
SB

begin

  x = (/0.205, 0.280/)
  y = (/0.155, 0.050/)

  wks = gsn_open_wks("X11","Test_fig")             ; send graphics to PNG
file

  res                     = True
  res at gsnDraw             = False            ; don't draw
  res at gsnFrame            = False            ; don't advance frame

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

  plot                    = gsn_csm_xy (wks,x,y,res)

draw(plot)
frame(wks)
end

On Fri, Jul 19, 2019 at 4:00 PM Karin Meier-Fleischer via ncl-talk <
ncl-talk at ucar.edu> wrote:

> 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 listncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> _______________________________________________
> 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/20190720/f50f9ae1/attachment.html>


More information about the ncl-talk mailing list