[ncl-talk] unable to set vph and vpw

Mary Haley haley at ucar.edu
Wed May 24 16:06:21 MDT 2017


Hi Geeta,

In order to panel plots and make sure they are the same size, you need to
make sure the individual plots being passed to gsn_panel are the same size.

You could set vpWidthF and vpHeightF for all four plots to the same set of
values, since you are already doing this for one plot. You will need to
make sure gsnMaximize is not set to True for the individual plots, because
this causes them to be resized.

However, the important thing to know is that vpWidthF/vpHeightF only
affects the box that encloses the plot itself, and not the area that
includes the labelbar, the tickmarks, and the titles. This means that your
second plot, which doesn't appear to have a labelbar, is going to be a very
different size than everybody else.

If gsn_panel is giving you problems, then you might want to consider
panelling the plots yourself, by setting vpXF, vpYF, vpWidthF, and
vpHeightF for each plot. For an example of this, see panel_20.ncl:

http://www.ncl.ucar.edu/Applications/panel.shtml#ex20

To better understand what vpWidthF and vpHeightF refer to, see our viewport
page:

http://www.ncl.ucar.edu/Applications/viewport.shtml

The viewport is the area with the plot, while the "bounding box" is the
whole area that includes titles, labelbars, etc.

-Mary


On Sun, May 21, 2017 at 7:12 AM, Geeta Geeta <geetag54 at yahoo.com> wrote:

> Hi
> I am making a panel plot in which I have set
> getvalues Plot(0)             ;  Chk mail dtd 13.12.2016 Adam
>     181       "vpWidthF"  : vpw
>     182       "vpHeightF" : vph
>     183     end getvalues
>
> (chk lines 181-183)
> for all the plots. but the 2nd plot comes of different size. Pls chek the
> vph and vpw for the 2nd plot at the line no's  (273-276)
>               Rests2 at mpShapeMode     =   "FreeAspect"
>     274    Rests2 at vpWidthF        =   vpw
>     275    Rests2 at vpHeightF       =   vph
>     276
>
> I do not know what is going wrong. Atttaching the panel figure.
> I printed the output which is .......
> (0) ++++++++++++++++++++
> (0) plot0  0.738519   0.553889
> (0) Portion 2nd of error Begins
>
>
> (0) plot1  0.738519
> (0) plot1   0.553889
>
>
> Geeta.
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170524/777e8ef7/attachment.html 


More information about the ncl-talk mailing list