MathGroup Archive 2002

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

Search the Archive

RE: Plot2D: How to attach names to plotted functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg32265] RE: [mg32240] Plot2D: How to attach names to plotted functions
  • From: "Florian Jaccard" <jaccardf at eicn.ch>
  • Date: Wed, 9 Jan 2002 23:37:22 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello !

You can for example do this :

In[3]:= f[x_] := 2x; g[x_] := -x^2

In[5]:=
<<Graphics`Legend`

In[11]:=
Plot[{f[x],g[x]},{x,-2,2},AspectRatio->Automatic,
    PlotStyle->{{},Dashing[{0.05}]},PlotLegend->{f,g}];


Or, with colors :

In[3]:= f[x_] := 2x; g[x_] := -x^2

In[5]:=
<<Graphics`Legend`

In[12]:=
<<Graphics`Colors`

In[13]:=
Plot[{f[x],g[x]},{x,-2,2},AspectRatio->Automatic,
    PlotStyle->{Red,Green},PlotLegend->{f,g}];

If you look at "Help", you will see the options for "PlotLegend" !

Meilleures salutations

Florian Jaccard
EICN-HES
e-mail : jaccardf at eicn.ch


-----Message d'origine-----
De : Klaus-J. Eckardt [mailto:klaus-juergen.eckardt at fujitsu-siemens.com]
Envoyé : mer., 9. janvier 2002 09:18
À : mathgroup at smc.vnet.net
Objet : [mg32240] Plot2D: How to attach names to plotted functions


Hello, I'm just a beginner and I met the following problem.

When plotting e.g. with the Plot2D command two functions f[x] anf g[x]
simultaneously is it possible to order Mathematica to attach the names of
the functions to the graphs? The reason is simple: it is not always obvious
which graph belongs to which function.

Until now I haven't found an appropriate parameter.

Many thanks in advance.

Best regards,

Klaus

klaus-juergen.eckardt at fujitsu-siemens.com






  • Prev by Date: RE: Plot2D: How to attach names to plotted functions
  • Next by Date: Re: Tick marks at frame edges
  • Previous by thread: RE: Plot2D: How to attach names to plotted functions
  • Next by thread: real variable