[Thread Prev][Thread Next][Index]

Re: RE: How can I draw a single color bar for multi-panelplots?



A recent Ferret improvement makes it much easier to define
custom viewports. The DEF VI/AXES qualifier means that the
viewports are given in fractions of the total page. To my
mind that is much more intuitive than the old way, which 
assumes an unknown (to the user) amount of white space
around the plot box that makes it very difficult to guess
how several boxes fit on a page.

Typically, I would say that a plotting region with a color
key needs borders of about 10% of the page on the bottom,
10-15% between panels in the vertical, 15-18% on the top for
the title, 5% on the left and between the panels horizontally, 
and 8% on the right for the colorbar.

For example, here's definitions for a 3-wide and 2-high 
set of panels:

def vi/axes/x=.05,.31/y=.52,.82 topleft
def vi/axes/x=.36,.62/y=.52,.82 topmid
def vi/axes/x=.67,.93/y=.52,.82 topright
def vi/axes/x=.05,.31/y=.1,.4 botleft
def vi/axes/x=.36,.62/y=.1,.4 botmid
def vi/axes/x=.67,.93/y=.1,.4 botright

Of course I would always remove the automatic labels with
the /NOLAB qualifier on PLOT, FILL, CONTOUR for this,
otherwise those labels will run over onto other panels.
The automatic labels are needed for quick-looks, but when
making plots to show, they are a distraction and take up
way too much white space that should be used for the plot.

Billy K

----- Original Message -----
From: <Mick.Spillane@noaa.gov>
Date: Wednesday, April 20, 2005 8:05 am
Subject: RE: How can I draw a single color bar for multi-panel plots? 

> Hi Yun,
>    The overlap of the panels on the right is not a problem,
> but the result of using the viewports "ll, lr, ul, ur" without
> taking extra steps to control how the axes are located within
> each.  Usually when producing a multi-panel plot like this I
> define my own viewports to eliminate the white space between the
> panels. The tool I find convenient in designing viewports is called
> "viewdef" and can be found in the Mail Archives (search for viewdef).
> Or you could read about "define viewport" in the manual.
> 
>    Alternatively, for a quick look at how altering other
> properties of the plot can improve the situation try inserting the
> plotplus command "ppl axlen,4.5" before my previous demo after each
> "set view ul". This shortens the length of the x-axis (from the
> default value that "ll, lr, ul, ur" assign) to 4.5 inches.
> 
> !------ REVISED demo of a shared color bar -------
> 
> ppl axset,0,0,0,0   ! turn off all axes
> 
> set view full       ! this will be for the desired color bar
> ! choose a 2-d variable to shade with value outside color bar range
> shade/nolab/i=1:8/j=1:6/lev=(100,2200,100) 0*(i+j)
> 
> ppl axset,1,1,1,1   ! turn axes back on
> 
> set view ul ; ppl axlen,4.5 ! reduce the x-axis length
> shade/nolab/i=1:8/j=1:6/lev=(100,2200,100)/nokey 50*(i+j)
> set view ur ; ppl axlen,4.5
> shade/nolab/i=1:8/j=1:6/lev=(100,2200,100)/nokey 75*(i+j)
> set view ll ; ppl axlen,4.5
> shade/nolab/i=1:8/j=1:6/lev=(100,2200,100)/nokey 100*(i+j)
> set view lr ; ppl axlen,4.5
> shade/nolab/i=1:8/j=1:6/lev=(100,2200,100)/nokey 150*(i+j)
> !---------------------------------------------------------
> 
> Good luck,
> Mick
> 
> |!!! Mick.Spillane@noaa.gov !!!|
> |__Room 2070 Bldg#3 NOAA/PMEL__|
> |____Phone_:_(206)526-6780_____|
> 
> 
> 
> 


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement