[ncl-talk] Add polyline, polygon, and polytext to a map generates two PNG files.

Wei Huang whuang at univ-wea.com
Tue Jul 14 12:18:29 MDT 2015


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<mailto: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<mailto:whuang at univ-wea.com>


_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto: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/<http://www.cgd.ucar.edu/staff/asphilli/>   303-497-1726

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150714/fa64e5dc/attachment.html 


More information about the ncl-talk mailing list