[Thread Prev][Thread Next][Index]
Re: [ferret_users] legend and dashed lines
Hi Alexa -
Have a look at the script below. You can make colored lines with dash
patterns by using the syntax PLOT/DASH=(down1,up1,down2,up2)/
COLOR=.... Then do Fprint -l cps. You can make this work with the
legend line script below by adding a 7th argument for a dash pattern,
and modifying the plot/vs command near the bottom. (It could be
general if you made a default of a full line that would have dash
pattern (1,0,1,0)). (I haven't tested this but it should work).
Billy K
On Mar 1, 2007, at 9:41 PM, Alexa Griesel wrote:
Dear ferret users,
What would be the best way to
produce plots with different dashed line styles
and the corresponding legend, that can be moved to
a desired place ?
I think the legline script only lets
you use different colors ?
(and I don't want to just omit the -l cps when converting
to ps files).
thanks so much, Alexa
\CANCEL MODE verify
!-----------------------------------------------------------------------
------+
! Ferret v5.50 scripts E. Vanvyve 19.06.2003 (LM
28.07.2003)
!
! MAKE A LEGEND LINE AND ITS LABEL
! script from Billy Kessler <billy.kessler@xxxxxxxx>, adapted since
! and again (use of PLOT/VS rather than ALINE) 16-dec-2006
!
! Syntax : go comm $1 $2 $3 $4 $5 $6
! $1 = x-value of line starting point (nouser units)
! $2 = length of line (nouser units)
! $3 = y-value of line (nouser units)
! $4 = line type (number 1-19)
! $5 = text character height (negative for z pos
down axes)
! $6 = label text (in double-quotes if more than 1
word)
!
! ------<-$2->------ "$6($5)" [< $3]
! ^
! [$1]
!
! ! this one handles either z pos up or down axes
!-----------------------------------------------------------------------
------+
!LINE : xy coordinates in nouser units
!$ppl$yaxis_min : y axis minimum / $ppl$yaxis_max : y axis maximum
!$ppl$xaxis_min : x axis minimum / $ppl$xaxis_max : x axis maximum
!axis ranges/length
! these are relative to the first x-value of the data ($xaxis_min)
! see comments at the text label below
DEFINE SYMBOL xr = `($xaxis_max) - ($xaxis_min)` !
user units
DEFINE SYMBOL yr = `($yaxis_max) - ($yaxis_min)` !
user units
DEFINE SYMBOL xl = `($ppl$xlen)` !
nouser units
DEFINE SYMBOL yl = `($ppl$ylen)` !
nouser units
!space between y-axis and line beginning
DEFINE SYMBOL xs = `($xr) / 30`
! ------------------ "$6($5)" [< y1]
! ^ ^
! [$x1] [$x2]
DEFINE SYMBOL x1 = `($xaxis_min) + ($1) * ($xr)/($xl)`
DEFINE SYMBOL x2 = `($x1) + ($2) * ($xr)/($xl)`
DEFINE SYMBOL y1 = `($yaxis_min) + ($3) * ($yr)/($yl)`
! use plot/vs rather than aline
ppl window,off
plot/vs/over/nolab/line=$4 {`($x1)`,`($x2)`},{`($y1)`,`($y1)`}
ppl window,on
!TEXT : xy coordinates in nouser units
! note that these are relative to the beginning of the plot x-axis
! this is not necessarily the same as ($xaxis_min)!
DEFINE SYMBOL tx = `($1) + ($2)+($2)/10`
DEFINE SYMBOL ty = `($3)-($5)/2`
!LABEL/[no]user xpos, ypos, center, angle, size text
LABEL/nouser ($tx) ($ty) -1 0 ($5) ($6)
CANCEL SYMBOL xr yr xl yl xs x1 x2 y1 tx ty
SET MODE/last verify
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Privacy Policy | Disclaimer | Accessibility Statement