Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7329

legend in a combined plot

From Nike Dattani <dattani.nike@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject legend in a combined plot
Date 2011-12-18 09:39 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jckcbk$1m0$1@smc.vnet.net> (permalink)

Show all headers | View raw


Greetings!
I'd love to be able to make a legend for the following figure:
=============================
{aa, a} = Timing[Plot[x^2, {x, 0, 1}, PlotRange -> {0, 1}, PlotStyle -
> {{Thickness[0.025], Black}}]];
{cc, c} = Timing[Plot[x^2, {x, 0, 1}, PlotRange -> {0, 1}, PlotStyle -
> {Thickness[0.01], Red, Dashed}]];
{bb, b} = Timing[Plot[x^2, {x, 0, 1}, PlotRange -> {0, 1}, Mesh -> 15,
MeshStyle -> Directive[PointSize[0.035], Green], PlotStyle ->
{{Thickness[0.01], Red, Dashed}}]];

Show[a, c, b]
=============================
with the first curve being "CPU time =" aa


I've tried using:
Needs["PlotLegends`"]

along with Show[a,c,b,PlotLegend->{{"CPU time=" aa},{"CPU time=" cc},
{"CPU time=" bb}}

And I've also tried putting the legend command inside the Plot command
in the line {aa,a}=Timing[Plot.....

But sadly, neither of these methods worked ='(

Would any brave souls wish to lead me to the light ?
Thank you!
Nike









Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

legend in a combined plot Nike Dattani <dattani.nike@gmail.com> - 2011-12-18 09:39 +0000
  Re: legend in a combined plot JUN <noeckel@gmail.com> - 2011-12-19 12:16 +0000

csiph-web