RE:Labeling Lines on a multiple plot
- Subject: [mg2612] RE:[mg2159] Labeling Lines on a multiple plot
- From: penny at edu-suu-scf.sc.suu.edu (Des Penny)
- Date: Mon, 27 Nov 1995 21:36:27 -0500
- Approved: usenet@wri.com
- Distribution: local
- Newsgroups: wri.mathgroup
- Organization: Wolfram Research, Inc.
Hi:
I noticed that the code provided by Seth Chandler for labeling lines on a
plot had a bug in it. Since it's such a nice piece of code and since no
one else has posted a correction, I thought I should do so. The code is
identical to Seth's except for the bug correction and two slight
improvements.
flist={Function[x,x],Function[x,x+20Sin[x/10]],
Function[x,x+30 Cos[x/20]]};
thelabels={"a","b","c"};
With[{rightEdge=-5},
Plot[Evaluate[Through[flist[x],List]],{x,-50,rightEdge},
PlotRange->All,
Epilog->MapThread[Text[#2,{rightEdge,#1[rightEdge]},
{-2,0}]&,{flist,thelabels}]]
]
Seth had "first" instead of "flist" in the last line.
Cheers,
Des Penny
==========================
Des Penny
Physical Science Dept.
Southern Utah University
Cedar City, UT 84720
VOICE: (801) 586-7708
FAX: (801) 865-8051
e-mail: penny at suu.edu
==========================