MathGroup Archive 2007

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

Search the Archive

Re : Re: Mathematica 6.0 - Legend


Thanks Daniel,
   But I think it is really me... :)  I have a mental block or an "old age" block but I can not make sense out of the documentaion on ShowLegend....   :(

Here is what I do.

Needs["PlotLegends`"]

a = Table[{i,i^2},{i,1,20}];
b = Table[{i,i^3},{i,1,20}];

ListLinePlot[a, PlotStyle -> {Red}]

(* I get a nice graph of my data *)

(* Here I would like to put a Legend showing the color and name of the plot *)

ShowLegend[
  ListLinePlot[a, PlotStyle->{Red}],
  Legend[{Red,"Line a"}]
]

And it does NOT work.... I get the following as output

ShowLegend[Picture of the plot, Legend[RGBColor[1,0,0],Line a}]]

I tried different ways, but to no avail...!

If I can get something, I want to put both plots a and b on the same graph and a legend showing the right color with the right name.

The actual plot I need to do is with 5 plots.


So please... HELP maybe by explaining step by step how to do it.

I really feel stupid not being able to make sense at something that should be simple. And I have to say that I've been using Mathematica since version 4.  What a shame for me to be stuck like that! But, I think that MathGroup is there to help people like me here and laugh after they press the Return key !  :-)

Thanks again,

Robert

Robert Pigeon



  • Prev by Date: Re: 2D Convolution
  • Next by Date: Re: Re: error message Convert::incomp in units package of Mathematica 6.0
  • Previous by thread: Re: Mathematica 6.0 - Legend
  • Next by thread: Re: Mathematica 6.0 - Legend