     ! bn_multi_line_labels.jnl     
! March 31, 2003
!
! ACM 4/2005 ! set mode meta to save this plot for the metafile checks.
!            and ! cancel mode logo, so that .plt files are comparable.
! ACM 1/2007 Change from a bunch of plot items in a viewport, to separate
!            plots; for better checking of batch mode


plot/i=1:100/title="multi line title<nl>with the second line pretty long: \
so Ferret will resize the entire title. Titles are sized according to the\
<nl>longest line <nl>and centered individually" i*cos(i/8)
ppl plot
plot/over/i=1:100 i*sin(i/8)

set mode meta multi_line_labels.plt
cancel mode logo
plot/i=1:100/title="@p2two-line<NL>RED title"/set i*cos(i/8)
ppl ylab "A four-line y label.<nl>second line<nl>third line<NL>fourth line"
ppl xlab "a two-line X label. <nl>Not good together with a multi-line title"
ppl plot

plot/over/i=1:100/title="short two-line<nl>title for the overlay line" i*sin(i/8)
plot/over/i=1:100/title="here is the key for the<nl>second overlay line" i*sin(i/4)

label 10,80,-1,-20,0.2,"@CSfonts and @p2colors<nl>a@p1nd at an angle<NL>\
no@p3w green and @CRCR font<NL>back@CS to script"

label 30,-70,-1,40,0.2,"first line, then blank<NL> <NL>third line, all rotated"

label/nouser 6.5,6,1,90,0.2,"@p2Another @CImoveable label<nl>Set to @CRCR and @p4P4\
<NL>at 90 degrees"
set mode/last meta
set mode/last logo

plot/title="multi-line key labels"/i=1:100 i*sin(i/12)
plot/over/i=1:100/title="Three-lines<nl>second line<nl>overlay 1" i*sin(i/6)
plot/over/i=1:100/title="Two-lines<nl>overlay 2" i*cos(i/6)
plot/over/i=1:100/title="Three-lines<nl>second line<nl>overlay 3" -1*cos(i/10)
plot/over/i=1:100/title="One-line" i*cos(i/8)
plot/over/i=1:100/title="Three-line<nl>second<nl>overlay5" i*cos(i/14)
plot/over/i=1:100/title="Two-line<nl>overlay6" i*cos(i/20)
plot/over/i=1:100/title="Three-line<nl>second<nl>overlay7" i*sin(i/12)

   

plot/i=1:100 i*cos(i/8)


! label 30,95,0,0,0.1,\
! label 70,95,1,0,0.1,\
label 3,95,-1,0,0.12,\
"@CRHere is a long label, made with the LABEL command:<NL>\
 <NL> Ferret is an interactive computer visualization and analysis<NL>\
environment designed to meet the needs of oceanographers and<NL>\
meteorologists analyzing large and complex gridded data sets. It<NL>\
runs on most Unix systems, and on Windows NT/9x using X<NL>\
windows for display. It can be installed to run from a Web<NL>\
browser (WebFerret) for use while away from your desk or<NL>\
from a system lacking X windows software. It can transparently<NL>\
access extensive remote Internet data bases using OPeNDAP,<NL>\
formerly known as DODS. See the dods webpage\
<NL> <NL>\
Ferret was developed by the Thermal Modeling and Analysis<NL>\
Project (TMAP) at PMEL in Seattle to analyze the outputs of its<NL>\
numerical ocean models and compare them with gridded,<NL>\
observational data. The model data sets are generally multi-<NL>\
gigabyte in size with mixed 3 and 4-dimensional variables defined<NL>\
on staggered grids. Ferret offers a Mathematica-like approach to<NL>\
analysis, new variables may be defined interactively as<NL>\
mathematical expressions involving data set variables.<NL>\
Calculations may be applied over arbitrarily shaped regions. Fully<NL>\
documented graphics are produced with a single command.\
<NL> <NL>\
Many excellent software packages have been developed recently<NL>\
for @p2scientific visualization@p1. The features that make Ferret distinctive<NL>\
among these packages are Mathematica-like flexibility,<NL>\
geophysical formatting, intelligent connection to its data base,<NL>\
memory management for very large calculations, and symmetrical<NL>\
processing in 4 dimensions."


set win/clear
plot/sym/i=1:5/nolab/noaxes i
ppl ylab "@CRlong y label<NL>@p2line 2 in red, longer than the other lines."
ppl xlab "@p4Tests using the %xaxis and %yaxis commands<NL>@p5@CItwo lines<NL>center a@P1 long third line too"
ppl %yaxis/nouser,0,50,4,1, , , ,-1
ppl %xaxis/nouser,0,50,4,1, , , ,-1

ppl %yaxis/nouser,0,50,4,2, , , ,0
ppl %xaxis/nouser,0,50,4,2.5, , , ,0

ppl %yaxis/nouser,0,50,4,6, , , ,1
ppl %xaxis/nouser,0,50,4,4, , , ,1


can view; set view upper
plot/i=1:100/axes=1,0,0,1/set/title="labels on top and right<nl>space for two lines on the y axis at the right" i*cos(i/8)
ppl xlab "a multi line x label<NL>here is line 2<NL>here is line three<NL>here is line four"
ppl labset, , , 0.08
ppl ylab "a multi line y label<NL>here is line two<NL>here is line three<NL>"
ppl plot

set view lower
ppl axlen `($ppl$xlen)-1`

plot/i=1:100/axes=1,0,0,1/set/title="shortened the x axis to make space" i*cos(i/8)
ppl xlab "a multi line x label<NL>here is line two<NL>here is line three<NL>here is line four"
ppl ylab "a multi line y label<NL>here is line two<NL>here is line three<NL>here is line four"
ppl plot

! reset
can view
ppl axlen,8

! size and rotate moveable labels.

plot/i=1:100/set i*cos(i/8)
ppl labs,4,20,-60,-1,"A @CIppl labs@SR label,<NL>change size and <NL>rotation"
ppl rlabs,4,45
ppl hlabs,4,.4
ppl title "@P2@ACRED title in AC font<NL>put P2 first then AC otherwise \
the at sign in front of P2 not recognized"
ppl plot

ppl rlabs,4,0
