[ncl-talk] help with vpXF, vpYF

xiaoming Hu yuanfangcan at hotmail.com
Tue Apr 16 13:09:45 MDT 2019


Hello
   You either use vpXF and vpYF   or use gsn_panel   to put different plots in a panel,   but don't use them together.

   Using vpXF and vpYF (together with vpWidthF and vpHeightF) has more control on the way you put them together. Thus I prefer this approach.

Hope it helps
Xiaoming
________________________________
From: ncl-talk <ncl-talk-bounces at ucar.edu> on behalf of Laura Fowler <laura at ucar.edu>
Sent: Tuesday, April 16, 2019 1:39 PM
To: Ncl-talk
Subject: [ncl-talk] help with vpXF, vpYF

Hello:

I am trying to understand how the script panel_14.ncl is used to place the different panels, and the use of vpXF, vpYF, ...  I created the one row - one column panel plot (see attached rh.png). I had use vpXF and vpYF in order to see the right and left labels of the plots.  To get this panel plot, I also used gsnPanelDebug to output the location of the left and right panels (see output)..


(0) There are 2 valid plots out of 2 total plots

(0) -------Panel viewport values for each plot-------

(0)     plot #0

(0)     new x,y      = 0.0902846,0.85604

(0)     orig wdt,hgt = 0.9,0.6

(0)     new wdt,hgt  = 0.387752,0.258502

(0) -------Panel viewport values for each plot-------

(0)     plot #1

(0)     new x,y      = 0.52,0.85604

(0)     orig wdt,hgt = 0.9,0.6

(0)     new wdt,hgt  = 0.387752,0.258502

(0) -------min/max X,Y viewport positions for plots-------

(0) min/max x viewport position = 0.0902846/0.52

(0) min/max y viewport position = 0.85604/0.85604

(0) -------min/max NDC values for all objects in panel-------

(0) min/max x position = 0.00490188/0.975557

(0) min/max y position = 0.563662/0.883103

Then I decided to add a second row, but the plot looks very different from what I expected (see rh3.png). The figures are smaller, the labels are bigger although I specified (which really baffles me):
res at vpWidthF                 = 0.387752
res at vpHeightF                = 0.258502

Here is the output of gsnPanelDebug with 2 columns and 2 rows:


(0) There are 4 valid plots out of 4 total plots

(0) -------Panel viewport values for each plot-------

(0)     plot #0

(0)     new x,y      = 0.0902846,0.85604

(0)     orig wdt,hgt = 0.387752,0.258502

(0)     new wdt,hgt  = 0.33008,0.220054

(0) -------Panel viewport values for each plot-------

(0)     plot #1

(0)     new x,y      = 0.52,0.85604

(0)     orig wdt,hgt = 0.387752,0.258502

(0)     new wdt,hgt  = 0.33008,0.220054

(0) -------Panel viewport values for each plot-------

(0)     plot #2

(0)     new x,y      = 0.0902846,0.57

(0)     orig wdt,hgt = 0.387752,0.258502

(0)     new wdt,hgt  = 0.33008,0.220054

(0) -------Panel viewport values for each plot-------

(0)     plot #3

(0)     new x,y      = 0.52,0.57

(0)     orig wdt,hgt = 0.387752,0.258502

(0)     new wdt,hgt  = 0.33008,0.220054

(0) -------min/max X,Y viewport positions for plots-------

(0) min/max x viewport position = 0.0902846/0.52

(0) min/max y viewport position = 0.57/0.85604

(0) -------min/max NDC values for all objects in panel-------

(0) min/max x position = -0.0361212/0.941489

(0) min/max y position = 0.292702/0.902336



Can somebody help me figure out or tell me what to do so that the 4 panel plots look like the 2 panel plots. I have spent a considerable amount of time doing this, and I am at loss. If interested the script (test.ncl, also attached is in /gpfs/fs1/scratch/laura/MPASprojects2018/MPAS.cu_shallow/novemberPUBLICATION/test/test.ncl.


Many thanks for your suggestions.
Laura




--
!-------------------------------------------------------------------------------------------------------------
Laura D. Fowler
Mesoscale and Microscale Meteorology Division (MMM)
National Center for Atmospheric Research
P.O. Box 3000, Boulder CO 80307-3000

e-mail: laura at ucar.edu<mailto:laura at ucar.edu>
phone: 303-497-1628

!-------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190416/4b38880a/attachment.html>


More information about the ncl-talk mailing list