[ncl-talk] Error on the gsnXRefLine

Rick Brownrigg brownrig at ucar.edu
Mon May 21 10:50:38 MDT 2018


My apologies -- I misunderstood the purpose of the xyMarkerColors
resource.  Try the attached slightly modified version of your script. What
I did was set xyMarkerOpacityF to zero, so that the markers drawn by
gsn_csm_xy() will be completely transparent, and thus only the markers
drawn by gsn_add_polymarker() are visible in the intended colors.

xyMarkerOpacityF is available in NCL 6.4.0+  If you have an older version
of NCL try setting

  res at xyMarkerColor = (/ 0., 0., 0., 0. /)

to achieve the same result.

Hope that helps...
Rick


On Mon, May 21, 2018 at 9:59 AM, Vanúcia Schumacher <
vanucia-schumacher at hotmail.com> wrote:

> Thanks for the quick response, but it did not work.
> The script is attached.
>
> Thank you for the advance
>
> ------------------------------
> *De:* Rick Brownrigg <brownrig at ucar.edu>
> *Enviado:* segunda-feira, 21 de maio de 2018 12:29:40
> *Para:* Vanúcia Schumacher
> *Cc:* ncl-talk at ucar.edu
> *Assunto:* Re: [ncl-talk] Error on the gsnXRefLine
>
> Hi,
>
> I think what is happening is that gsn_csm_xy() is drawing markers using
> defaults, which would be black and index 0 (the asterick). I'm a little
> surprise that the subsequent calls to gsn_add_polymarker() don't completely
> overlay the astericks. However, you might be able to get what you want with
> just a call to gsn_csm_xy() by setting:
>
>    res at xyMarker = 16
>    res at xyMarkerColors = colors
>
> See the docs at:
>
>     http://ncl.ucar.edu/Document/Graphics/Resources/xy.shtml
>
> Hope that helps,
> Rick
>
> On Sun, May 20, 2018 at 5:52 PM, Vanúcia Schumacher <
> vanucia-schumacher at hotmail.com> wrote:
>
> Hi
>
>
> I would like to know how to remove the "x" shaped markers that are
> appearing in my figure (attached) when I include the option:
> res at gsnXRefLine   = (/0./)?
>
>
> res                                              = True
>
> ....
>
> res at xyMarkLineModes              = "Markers"
>
> res at gsnXRefLineDashPatterns = (/14/)
>
> res at gsnXRefLine                       = (/0./)
>
> ...
>
> ...
>
>  map = gsn_csm_xy(wks,x,y,res)   ;blank xy plot
>
>   mkres    = True
>   stations = new(dimsizes(x),graphic)
>
>     do i = 0, dimsizes(x)-1
>
>           mkres at gsMarkerColor = colors(i)
>           mkres at gsMarkerSizeF = 0.01
>           mkres at gsMarkerIndex = 16
>
>           stations(i) = gsn_add_polymarker(wks,map,x(i),y(i),mkres)
>
>     end do
>   draw(map)
>   frame(wks)
>
>
> _______________________________________________
> 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/20180521/12f108e5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scater.mb.elev.1.ncl
Type: application/octet-stream
Size: 2006 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180521/12f108e5/attachment.obj>


More information about the ncl-talk mailing list