[Thread Prev][Thread Next][Index]

Re: [ferret_users] Title at the top of the plot



It seems much simpler to use LABELS to put whatever text you want wherever you want it.

Here's a little script to determine the center and appropriate distance above a plotbox for titles:

-------
\can mode verify
! 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
-------

Put this in your path; I call it "getlens.go". It defines the center in the x-direction, and two useful heights above the plot box in the y-direction (in no-user units, independent of the particular values being plotted). Then:

set vi ....
plot/nolab .....    ! omit the title and labels
! plot/tit=" " .... ! if the automatic labels are desired, but excluding the title
go getlens.go
label/nou `ctr` `toplab` 0 0 .25 Main title text
label/nou `ctr` `toplab2` 0 0 .16 Secondary title text

Or, if you want to put the automatic title in a different place:
First make a dummy plot (which will have the title at the bottom). This will define the symbol ($labtit) which contains the automatic title. Then:

plot/nolab ....    ! real plot omitting the title
label/nou `ctr` `toplab` 0 0 .25 ($labtit) ! place the title at the top


Billy K

On 22Mar 2007, at 5:40 AM, Paul Young wrote:

Hi Jean,

You can get a title at the top of the plot by defining a new viewport,
filling it with an 'empty' plot (shaded white and no axes or labels) and then use the label command. I have used something like this to create a
page with 3 plots and a title at the bottom:

---
define view/xlimits=0,1/ylimits=0.925,1/text=0.5 title
define view/xlimits=0,1/ylimits=0.645,0.925 t1
define view/xlimits=0,1/ylimits=0.365,0.645 m1
!Make bottom view larger to accomodate the color bar
define view/xlimits=0,1/ylimits=0,0.365 b1

!Need to fill the 'title' viewport with a blank plot, so the title can
!be added as a label
set view title
go margins 0.1 0.1 0.1 0.1
shade/noaxes/nolabels/i=1:2/j=1:2/nokey/pal=white (i+j)

!Add title text (centered)
label 1.5,1.5,0,0,0.3 My plot title

!Do the plots
set view t1

..etc etc
----

Hope this helps,

Paul




On Thu, 2007-03-22 at 12:26, jean oliveira wrote:
Hi all,

I wnat to make a fill with a title  at the top of the plot (yes?
fill/title="title at the top" test.nc). Is it possible?

Thanks

Jean





_____________________________________________________________________ _ Agora o Windows Live Spaces tem rede de amigos! Clique aqui e descubra
a novidade



[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement