[ncl-talk] Maximize png Output

David Jones jonesd647 at yahoo.ca
Sat Sep 12 14:36:16 MDT 2015


(Sorry, re-sending as I didn't edit the subject line or CC the OP)

Hi Sebastian,


I don't have a direct answer to your question... What I normally do with png output is to set the variables wkHeight and wkWidth to large values so that the png output is very high resolution. So at the start of your script put something like:
type                        = "png"
type at wkWidth  = 2888 ; set these to whatever values you want
type at wkHeight = 2048 ;
wks                         = gsn_open_wks(type,out_file_name) 
Then at the very end of my script, I use the NCL "system" command to call ImageMagick to trim all of the white space at the edges of the plot. My script ends like this:...

if (type .eq. "png") then
   system("convert -trim +repage  " + out_file_name + ".png " + out_file_name + ".png ")
end if

end

Also note that if you're making particularly large files then you may need to insert something like *wsMaximumSize: 100000000 at the end of the .hluresfile in your home directory (I'm not sure if this still applies with the newest versions of NCL).

Good luck!
Dave.

     On Saturday, September 12, 2015 9:27 PM, "ncl-talk-request at ucar.edu" <ncl-talk-request at ucar.edu> wrote:
   Message:
Date: Sat, 12 Sep 2015 21:28:49 +0200
From: Sebastian Giersch <giersch at muk.uni-hannover.de>
Subject: [ncl-talk] Maximize png Output
To: ncl-talk at ucar.edu
Message-ID: <55F47CF1.5070301 at muk.uni-hannover.de>
Content-Type: text/plain; charset="utf-8"


Dear NCL Users,

i would like to use the whole space of my 1300x859 png-Output (see
png1.1). I've tried a lot (e.g. gsnMaximize) but it doesn't work. The
height of the plot ist nearly perfect but the width is to small
(vpHeightF = 0.2, vpWidthF=0.6). When I change it in my .ncl file (e.g.
vpHeightF = 0.2, vpWidthF=1.5) I get the wrong result (see png1.2).
Therefore I ask you: How can I use all the space without any margin.

Beste regards,
Sebastian Giersch

   

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


More information about the ncl-talk mailing list