[Thread Prev][Thread Next][Index]

Re: [ferret_users] Plot title at upper side

Hi Paulo -

As far as I know, the plot title given by /title can only go at the bottom. Therefore you will have to do this using labels (not ppl commands). Fortunately this is easy:

plot/nolab vobs, velm1, velm2, velm3, velm4, vlens ! a plot without any labels
label/nou 4 6.4 0 0 .25 Meu Titulo

If you are using the standard plot aspect ratio, the plot box is 8 inches wide by 6 inches high. Thus setting label/nou (/nouser means to work in inches rather than plot units), and specifying the position to be at x=4 (centered) and y=6.4 (0.4 above the plot top border) works pretty well. I often make 2 titles, a main one at height 6.9 and a secondary one at height 6.4.

If you have changed the aspect ratio of the plot box, here is a script that will figure these positions for you:

Make a file "getlens.go", or whatever you want to call it, in your ferret path.
Paste the following in it (between the dashed lines):

! get the current value of the PPLUS axis lengths.
let xxlen = ($ppl$xlen) ; let yylen = ($ppl$ylen)
let ctr = xxlen/2; let toplab = yylen+.9; let toplab2 = yylen+.4
say xxlen, yylen, xxlen/yylen = `xxlen`, `yylen`, `xxlen/yylen`
set mode/last verify
This defines 3 useful quantities: ctr is the center of the plot box in the x direction, and toplab and toplab2 are 0.4 and 0.9 inches above the plot box. Thus:

set win/asp=N     ! ratio of height to width; N is a number less than 2
plot/nolab vobs, velm1, velm2, velm3, velm4, vlens ! a plot without any labels go getlens.go ! run the script to define the quantities for this plot box
label/nou `ctr` `toplab` 0 0 .25 Meu Primeiro Titulo
label/nou `ctr` `toplab2` 0 0 .16 Meu Segundo Titulo

Note the back-quotes around `ctr`, `toplab` and `toplab2`. This evaluates these as numbers. Also note that the script must be run each time the plot box shape is changed.

Billy K

On 12Jan 2007, at 4:10 PM, Paulo Henrique wrote:


I have just a simple question: how do I put the title of my plot at the upper side of plot box?

I'm using the command

plot vobs, velm1, velm2, velm3, velm4, vlens

And my data is plotted with correspondent labels.

When I try

plot/title="Meu Titulo" vobs, velm1, velm2, velm3, velm4, vlens

data labels are replaced by the string "Meu Titulo". I want to add the string "Meu Titulo" at top and keep data labels at bottom.

I have null experience using PPL commands.

How can I do it?


Paulo Henrique

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement