MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4882] Re: legend for multiples curves on 2-D graph with mathematica
  • From: BobHanlon at aol.com
  • Date: Thu, 26 Sep 1996 22:42:32 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

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 at aol.com

---------------------
Forwarded message:
From:	xavier at agen.ufl.edu (Xavier Foussereau)
To: mathgroup at smc.vnet.net
To:	BobHanlon at aol.com

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,


==== [MESSAGE SEPARATOR] ====


  • Prev by Date: functional code
  • Next by Date: Scaling a 2-D graph to a 8.5*11 inches page
  • Previous by thread: Using Mma with Visual Basic & Visual C++
  • Next by thread: Scaling a 2-D graph to a 8.5*11 inches page