Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Re: legend for multiples curves on 2-D graph with mathematica
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
BobHanlon@aol.com

Posts: 906
Registered: 12/7/04
Re: legend for multiples curves on 2-D graph with mathematica
Posted: Sep 26, 1996 10:10 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Xavier,

Look in the Guide to Standard Packages:

Needs["Graphics`Legend`"];

var = x; nbrCycles = 4; k1 = 3; k2 = 1; k3 = 1; k4 = 0.1;
legend1 = "Sin[" <> ToString[k1] <> ToString[var] <>
"] * \n Cos[" <> ToString[k2] <> ToString[var] <> "]";
legend2 = "Cos[" <> ToString[k3] <> ToString[var] <>
"] * \n Exp[-" <> ToString[k4] <> ToString[var] <> "]";
Plot[{Sin[k1 x] Cos[k2 x], Cos[k3 x] Exp[-k4 x]},
{x, 0, nbrCycles Pi},
AxesLabel->{ToString[var],
"f[" <> ToString[var] <> "]"},
Ticks->{Table[{N[k Pi], ToString[k] <> "x"},
{k, 0, nbrCycles}], Automatic},
PlotStyle->{GrayLevel[0], Dashing[{0.03}]},
PlotLegend->{legend1, legend2},
LegendShadow->{0, 0},
LegendBorder->RGBColor[0, 0, 1]];


Bob Hanlon
bobhanlon@aol.com

---------------------
Forwarded message:
From: xavier@agen.ufl.edu (Xavier Foussereau)
To: BobHanlon@aol.com
Date: 96-09-24 12:34:59 EDT

Hello,

I am a graduate student at the University of Florida. For my research, I am
using Mathematica. I need to create 2-D graph with multiples curves which
legends include text and variable. Do you know how to to it? Thank in
advance.

Xavier Foussereau,








Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.