Re: Maximized rectangular graphic/plot

From: Paulo Santiago <paulohsm_at_nyahnyahspammersnyahnyah>
Date: Mon Mar 04 2013 - 14:55:41 MST

Hi Dave,

Thank you very much for the information.

I adopted your suggestion.

Cheers,

Paulo Santiago

2013/3/3 Dave Allured - NOAA Affiliate <dave.allured@noaa.gov>

> Paulo,
>
> Use a post processing tool to remove the white borders, such as this
> ImageMagick command. This is a Unix/Linux command command line, not
> an NCL command:
>
> convert -trim +repage ncl_output.png final.png
>
> The final aspect ratio is determined indirectly by the visible details
> in your NCL graphic, not directly through any single resource. The
> specifications of the X and Y axes are a starting point. However, the
> final PNG aspect ratio has to accommodate the position of titles, axis
> labels, color bar, and other annotations, as well as the main figure.
> I have found that a trial and error approach gives good results with
> very few iterations, once you get used to the post processing command.
>
> To increase the pixel resolution in the final PNG, increase
> wks@wkWidth and wks@wkHeight together. Don't try to do this with a
> convert command option, because that will simply make a blurry picture
> with more pixels! Be careful, there is a strong order-2+ tradeoff
> with memory consumption and program speed when @wkWidth and @wkHeight
> are increased.
>
> --Dave
> Reply to list only!
>
> On Sun, Mar 3, 2013 at 8:09 AM, Paulo Santiago <paulohsm@gmail.com> wrote:
> > Dear NCL users,
> >
> > I'm wondering how to get a graphic in PNG format with 3:4 aspect ratio
> (or
> > any other than 1:1) in a maximized fashion (that is, with zero or near to
> > zero space between the plot limits and the canvas edges).
> >
> > I changed the canvas aspect ratio by setting @wkWidth and @wkHeight of my
> > wks. When I use res@gsnMaximize=True, I got a rectangular canvas but
> square
> > graphic.
> >
> > Using res@vpHeightF and res@vpWidthF I control the aspect ratio of my
> > graphic, but I could not get such maximized graphic (even if I use
> > res@gsnMaximize=True).
> >
> > I also changed res@gsnBoxMargin to zero. There are always large blank
> strips
> > at upper and lower regions.
> >
> > I would like to know if there are more resources I could be missing and
> what
> > resources would these be.
> >
> > Thanks in advance!
> >
> > Cheers,
> >
> > --
> > Paulo Santiago
> > Ph.D. Student in Meteorology
> > Brazilian National Institute for Space Research
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
>

-- 
Paulo Santiago
Ph.D. Student in Meteorology
Brazilian National Institute for Space Research

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 4 14:56:11 2013

This archive was generated by hypermail 2.1.8 : Thu Mar 07 2013 - 08:55:58 MST