Re: Increasing the size of the image

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Dec 15 2009 - 07:29:17 MST


The vpXXX resources must be between the values of 0. and 1., so
setting a width or height to 1.6 will cause your plot to run off the

There's no way in NCL to say "double the size of the image" per se,
but there are other ways you can make the plot larger.

One is to set the following resource:

   res@gsnMaximize = True ; maximize size of plot
in page

This will make the plot as large as possible (with some margins) to
fit on an 8-1/2 x 11" sheet of paper, which means the plot gets
rotated 90 degrees. See attached.

You can use the ImageMagick "convert" tool to rotate the attached PS
file back again:

    convert -geometry 1000x1000 -trim -rotate -90 proj.png

If you don't want the image rotated in the PS file, then in then NCL
script additionally set:

   res@gsnPaperOrientation = "Portrait" ; don't rotate plot 90

Another way to increase the image is to run "proj_1.ncl" just as it
is, not setting gsnMaximize, but then using "convert" to make the
image larger.

    convert -geometry 1500x1500 -density 300 -trim proj.png

You can set the "1500x1500" to something larger if you want, but you
may want to increase the "density" value so the fonts don't get fuzzy.

You can get "convert" from

Good luck,


On Dec 14, 2009, at 10:46 PM, Wee-Beng Tay wrote:

> Hi,
> I'm trying to double the size of the example proj_1.ncl in http://
> I tried to play around and managed to increase the image by
> changing res@vpWidthF and res@vpHeightF from 0.8 to 1.6. It seems
> that the image is scale up and doubled but now I only get to see a
> quarter of image (attached). What must I do to double the entire
> image size?
> I tried to look at
> resize.shtml but it doesn't seem to work.
> Hope someone can help. Thanks!
> <>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Tue Dec 15 07:46:43 2009

This archive was generated by hypermail 2.1.8 : Thu Dec 17 2009 - 17:15:52 MST