[ncl-talk] Is my gsn_add_polyline usage wrong?
Rick Brownrigg
brownrig at ucar.edu
Thu Mar 5 07:07:44 MST 2020
Hi,
Try replacing:
draw(map)
draw(wks)
with
draw(map)
frame(wks)
It then works for me.
Rick
On Thu, Mar 5, 2020 at 5:14 AM Tomoko Koyama via ncl-talk <ncl-talk at ucar.edu>
wrote:
> Hello.
>
> I like to show a domain area a masked Lambert Conformal map.
> But the following simple script doesn’t work.
>
> Could you tell me what I miss?
>
> Thank you,
> Tomoko
>
> ;================================================;
> begin
> wks = gsn_open_wks("X11","map_NSI")
> ;
> ; Set up some map resources.
> ;
> res = True
> res at gsnFrame = False
> res at gsnDraw = False
> res at gsnMaximize = True
>
> res at mpProjection = "LambertConformal"
> res at gsnMaskLambertConformal = True
>
> res at mpLimitMode = "LatLon"
> res at mpMinLonF = 90
> res at mpMaxLonF = 180
> res at mpMinLatF = 68
> res at mpMaxLatF = 82
>
> res at tiMainString = "NSI Domain Area"
> map = gsn_csm_map(wks,res)
>
> ;************************************************
> ; create points for box
> ;************************************************
> ypts = (/ 80.0, 80.0, 70.0, 70.0, 80.0/)
> xpts = (/126.0, 158.0,158.0, 126.0,126.0/)
> ;************************************************
> ; add the box
> ;************************************************
> resp = True ; polyline mods desired
>
> dum = new(4,graphic)
>
> do i = 0 , 3
> dum(i) = gsn_add_polyline(wks,map,xpts(i:i+1),ypts(i:i+1),resp)
> end do
>
> draw(map)
> draw(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/20200305/1aec38aa/attachment.html>
More information about the ncl-talk
mailing list