[ncl-talk] Add polyline, polygon, and polytext to a map generates two PNG files.
David Brown
dbrown at ucar.edu
Tue Jul 14 12:54:09 MDT 2015
Wei,
You should use a different set of resources for the poly functions
from the ones you use for the gsn_csm_map call.
-dave
On Tue, Jul 14, 2015 at 12:18 PM, Wei Huang <whuang at univ-wea.com> wrote:
> Adam,
>
>
>
> I used gsn_add_* suite for the polylines, polygons, polytexts.
>
>
>
> If I set:
>
> res = True
>
> res at gsnDraw = False
>
> res at gsnFrame = False
>
>
>
> It can turn off (eliminate) the blank map, but later, there are a whole
> bunch of warning msgs,
>
>
>
> warning:gsnDraw/gsnFrame is not a valid resource in graphic_style at this
> time.
>
>
>
> This make it hard to read other msgs.
>
>
>
> Thanks,
>
>
>
> Wei Huang
>
>
>
> From: Adam Phillips [mailto:asphilli at ucar.edu]
> Sent: Tuesday, July 14, 2015 1:07 PM
> To: Wei Huang
> Cc: ncl-talk at ucar.edu
> Subject: Re: [ncl-talk] Add polyline, polygon, and polytext to a map
> generates two PNG files.
>
>
>
> Hi Wei,
>
> It depends on what functions/procedures you are using to draw your
> polylines/markers/text.. In all cases you should set gsnFrame = False in
> your res resource list.
>
> I prefer the gsn_add_* suite of functions to do what you are doing as it
> allows paneling. For those functions you also need to add gsnDraw = False to
> your res resource list.
>
> If you are just using gsn_text/gsn_polygon/gsn_polygon you can get away with
> not setting gsnDraw as is shown in polygon example #8 here:
> https://www.ncl.ucar.edu/Applications/Scripts/polyg_8.ncl
>
>
>
> Hope that helps!
>
> Adam
>
>
>
>
>
>
>
>
>
>
>
> On Tue, Jul 14, 2015 at 10:05 AM, Wei Huang <whuang at univ-wea.com> wrote:
>
> I am trying to add polyline, polygon, and polytext to a map, steps as below:
>
> res = ...
> wks = ...
> map = gsn_csm_map(wks, res)
>
> ;add lots of polylines, polygons, and polytexts to map
>
> draw(map)
> frame(wks)
>
> It generates two PNG files. With the first just a map.
>
> How can I remove the first blank map?
>
> Thanks,
>
> Wei Huang
> whuang at univ-wea.com
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
>
> --
>
> Adam Phillips
>
> Associate Scientist, Climate and Global Dynamics Laboratory, NCAR
>
> www.cgd.ucar.edu/staff/asphilli/ 303-497-1726
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
More information about the ncl-talk
mailing list