[ncl-talk] 2. unable to get plots of equal size in the panel plot. (Geeta Geeta)

Mary Haley haley at ucar.edu
Sun Dec 23 10:07:46 MST 2018


Geeta,

NCL doesn't let you change the width and height of a map plot to something
that causes the map to be skewed, unless you set:

Rests1 at mpShapeMode     =   "FreeAspect"

However, since you are changing the width and height of Plot(2) after it
has been created with:

 setvalues Plot(2)
   "vpHeightF"   : vph
   "vpWidthF"    : vpw
 end setvalues

then you also need to add the mpShapeMode resource and set it to
"FreeAspect":

 setvalues Plot(2)
   "vpHeightF"   : vph
   "vpWidthF"    : vpw
   "mpShapeMode" : "FreeAspect"
 end setvalues

See the attached script that illustrates this.  Note that the second plot
runs off the screen, but this should be okay because gsn_panel will resize
things for you.

--Mary


On Sun, Dec 23, 2018 at 7:25 AM Geeta Geeta <geetag54 at yahoo.com> wrote:

> thanks mary.
> pls find my code attached.
>
> as you have suggested, the gsnMaximize is set to FALSE in individual plots
> Geeta.
>
>
> On Friday, 21 December 2018 9:14 PM, Mary Haley <haley at ucar.edu> wrote:
>
>
> Geeta,
>
> From this output:
>
> 0)     plot #0
> (0)     new x,y      = 0.0208406,0.590802
> (0)     orig wdt,hgt = 0.75,0.5625
> (0)     new wdt,hgt  = 0.251402,0.188552
> (0) -------Panel viewport values for each plot-------
> (0)     plot #1
> (0)     new x,y      = 0.354174,0.590802
> (0)     orig wdt,hgt = 0.75,0.5625
> (0)     new wdt,hgt  = 0.251402,0.188552
> (0) -------Panel viewport values for each plot-------
> (0)     plot #2
> (0)     new x,y      = 0.687507,0.590802
> *(0)     orig wdt,hgt = 0.46875,0.5625      <--------- Not the same as the
> other two*
> (0)     new wdt,hgt  = 0.157126,0.188552
>
> It looks like the original width and height of plot #2 is not the same
> size as plots #0 and #1 which is going to be an issue.
>
> You need to take a look at how plot #2 is being created.  Make sure you
> are not setting gsnMaximize to True, as this will cause the plot to be
> resized. And, you want to set vpWidthF and vpHeightF for this plot so it's
> the same as the other two.
>
> If you continue to have problems, I really need to see your script and
> have your data so I can run it here and debug it.
>
> Thanks,
>
> --Mary
>
>
> On Fri, Dec 21, 2018 at 3:53 AM Geeta Geeta <geetag54 at yahoo.com> wrote:
>
> Hi Mary.
> Thanks for responding.
> I seperated the plot4 in which I was getting warning. but still plot3 the
> size (width is small). pls see the output.
> (0) plot0 vph and vpw    0.5625 0.75
> (0) plot1 vph and vpw    0.5625 0.75
> (0) plot2----getvals  vph and vpw    0.5625 0.75
> (0) 1st time Printting of Plot2
> (0) plot2 vph and vpw    0.5625 0.75
> (0) 2nd time Printting of Plot2
> (0) HERE IS ERROR+++++++++++
> (0) There are 3 valid plots out of 3 total plots
> (0) -------Panel viewport values for each plot-------
> (0)    plot #0
> (0)    new x,y      = 0.0208406,0.590802
> (0)    orig wdt,hgt = 0.75,0.5625
> (0)    new wdt,hgt  = 0.251402,0.188552
> (0) -------Panel viewport values for each plot-------
> (0)    plot #1
> (0)    new x,y      = 0.354174,0.590802
> (0)    orig wdt,hgt = 0.75,0.5625
> (0)    new wdt,hgt  = 0.251402,0.188552
> (0) -------Panel viewport values for each plot-------
> (0)    plot #2
> (0)    new x,y      = 0.687507,0.590802
> (0)    orig wdt,hgt = 0.46875,0.5625
> (0)    new wdt,hgt  = 0.157126,0.188552
> (0) -------min/max X,Y viewport positions for plots-------
> (0) min/max x viewport position = 0.0208406/0.687507
> (0) min/max y viewport position = 0.590802/0.590802
> (0) gsnPanelInvsblRight = 0.996732
> (0) gsnPanelInvsblLeft = 0.00326809
> (0) -------min/max NDC values for all objects in panel-------
> (0) min/max x position = 0.00326809/0.880773
> (0) min/max y position = 0.391378/0.6084
>
> I have used following RES for the panel plots.
>
> Panelres                                         = True
> Panelres at gsnMaximize                = True
> Panelres at gsnPanelDebug           =  True
>
> Plots are of equal size as indicated above in the output, but in panel
> plot, 3rd plot is smaller in width.
>
> 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/20181223/f01fa4dd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: map_skewed.ncl
Type: application/octet-stream
Size: 1671 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181223/f01fa4dd/attachment.obj>


More information about the ncl-talk mailing list