legend in a combined plot
- To: mathgroup at smc.vnet.net
- Subject: [mg123772] legend in a combined plot
- From: Nike Dattani <dattani.nike at gmail.com>
- Date: Sun, 18 Dec 2011 04:37:05 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
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