[ncl-talk] different sized plots
Mary Haley
haley at ucar.edu
Mon Apr 10 23:58:47 MDT 2017
Geeta,
The problem is that you are paneling plots that are different sizes. The
first two are the same, but the third one is different in size because it
doesn't have a labelbar. gsn_panel is trying to resize all of your plots
based on the total area that a plot takes up, and not just the area minus
the labelbar.
Since your third plot is a different size than the others, my suggestion is
to not use gsn_panel, and instead set the vpXF/vpYF/vpWidthF/vpHeightF
resources yourself.
You can actually use gsn_panel to help you determine the values to try.
First, set the following resource before you call gsn_panel:
Panelres at gsnPanelDebug = True
Then run your script. It will print a bunch of information like:
-------Panel viewport values for each plot-------
plot #0
new x,y = 0.0294018,0.779628
orig wdt,hgt = 0.7,0.49
new wdt,hgt = 0.261554,0.183088
-------Panel viewport values for each plot-------
plot #1
new x,y = 0.329402,0.779628
orig wdt,hgt = 0.7,0.49
new wdt,hgt = 0.261554,0.183088
The values you see on the "new" line are what gsn_panel resized and
repositioned your plots to. These are the values you can use for the vpXXX
resources. For example, in the first plot you would set:
res at vpXF = 0.0294018 ; or simply 0.03
res at vpYF = 0.779628 ; 0.78
res at vpWidthF = 0.261554 ; 0.26
res at vpHeightF = 0.183088 ; 0.18
Of course, you might want to tweak these a bit.
See panel_39.ncl for an example:
http://www.ncl.ucar.edu/Applications/panel.shtml#ex39
--Mary
On Sat, Apr 8, 2017 at 11:09 AM, Geeta Geeta <geetag54 at yahoo.com> wrote:
> dear NCL users.
> I have got different sized panel plots even after setting
> Plot(0) = gsn_csm_contour_map(WKS_FIG4,Z_fnl(:,:,68),res)
> India_id(0) = gsn_add_shapefile_polylines(
> WKS_FIG4,Plot(0),IND_shape_fname,shpres)
>
> delete(res at tmYLValues)
> delete(res at tmYLLabels)
>
> getvalues Plot(0) ; Chk mail dtd 13.12.2016 Adam
> "vpWidthF" : vpw
> "vpHeightF" : vph
> end getvalues
>
> Dont know why is it so. Pl s suggest
>
> 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/20170410/45fb80e8/attachment.html
More information about the ncl-talk
mailing list