The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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

Advanced Search

Back to Topic List Back to Topic List

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


Look in the Guide to Standard Packages:


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},
"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

Forwarded message:
From: (Xavier Foussereau)
Date: 96-09-24 12:34:59 EDT


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

Xavier Foussereau,

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.