I'm new to this site and new to Mathematica as you can see from my question. I'm also new to programming, btw.
I'm trying to produce a legend for my plot which I've coded as follows:
Needs["PlotLegends`"]
ds1 = {{0, 0.53}, {10, 1.00}, {20, 2.19}, {35, 3.61}};
ds2 = {{0, 0.52}, {10, 0.91}, {20, 1.97}, {35, 3.09}};
ds3 = {{0, ds1[[1, 2]] - ds2[[1, 2]]},
{10, ds1[[2, 2]] - ds2[[2, 2]]},
{20, ds1[[3, 2]] - ds2[[3, 2]]},
{35, ds1[[4, 2]] - ds2[[4, 2]]}
};
mf1 = LinearModelFit[ds1, x, x];
mf2 = LinearModelFit[ds2, x, x];
mf3 = LinearModelFit[ds3, x, x];
m1 = mf1["BestFit"]; m2 = mf2["BestFit"]; m3 = mf3["BestFit"];
Show[
{
ListPlot[{ds1, ds2, ds3},
PlotMarkers -> Automatic, PlotStyle -> {Blue, Red, Orange}
],
Plot[{m1, m2, m3}, {x, 0, 35}, PlotStyle -> {Blue, Red, Orange}]
},
Frame -> True,
FrameLabel -> {"Time (min)","Inorganic Phosphate Concentration (mM)"},
ImageSize -> {400, 300}
]
So, I'd like to use the ShowLegend function to have the legend displayed outside of the frame. I know that I can use the LegendPosition function to do this.
My problem, however, is the tags. How do I get the legend to show the names of the plots (ds1, ds2, ds3, m1, m2, and m3)?
