| Author |
Comment/Response |
Andrew
|
11/30/11 4:18pm
I've been plotting a list of points and it has been working normally but when I try and add a legend I have a few problems.
Initially I was getting shadow errors and the plot would appear in a new window called messages. I have now stopped getting the shadow errors despite doing nothing to fix them but the plot still appears in the messages window.
The problem with this is if I change something in the code the plot does not change and to re plot I have to close Mathematica and reopen.
This is the code I am using:
In[1]:= Needs["PlotLegends`"]
In[2]:= list1 = {{1, 100.77}, {0.9, 118.03}, {0.8, 140.84}, {0.7,
172.07}, {0.6, 216.84}}
list2 = {{1, 168.4}, {0.9, 194.5}, {0.8, 219.7}, {0.7, 234.9}, {0.6,
358.8}}
list3 = {{1, 145.5}, {0.9, 170.4}, {0.8, 203.3}, {0.7, 248.4}, {0.6,
313}}
list4 = {{1, 63.2}, {0.9, 76.7}, {0.8, 88.2}, {0.7, 94.9}, {0.6,
158.6}}
list5 = {{1, 86.9}, {0.9, 103.7}, {0.8, 125.7}, {0.7, 144.5}, {0.6,
175.9}}
list6 = {{1, 88}, {0.9, 103.7}, {0.8, 122.5}, {0.7, 144.5}, {0.6,
175.9}}
ListLinePlot[{list1, list2, list3, list4, list5, list6},
AxesLabel -> {Length (m), Subscript[\[Omega], n]},
InterpolationOrder -> 2, Mesh -> Full, AxesOrigin -> {0.6, 50},
PlotMarkers -> {"", "x", "", "+", "x", "+"},
PlotLegend -> {"Model 1", "Model 2", "Model 3", "Model 4",
"Stroboscope", "Tachometer"}, LegendShadow -> None]
Out[2]= {{1, 100.77}, {0.9, 118.03}, {0.8, 140.84}, {0.7,
172.07}, {0.6, 216.84}}
Out[3]= {{1, 168.4}, {0.9, 194.5}, {0.8, 219.7}, {0.7, 234.9}, {0.6,
358.8}}
Out[4]= {{1, 145.5}, {0.9, 170.4}, {0.8, 203.3}, {0.7, 248.4}, {0.6,
313}}
Out[5]= {{1, 63.2}, {0.9, 76.7}, {0.8, 88.2}, {0.7, 94.9}, {0.6,
158.6}}
Out[6]= {{1, 86.9}, {0.9, 103.7}, {0.8, 125.7}, {0.7, 144.5}, {0.6,
175.9}}
Out[7]= {{1, 88}, {0.9, 103.7}, {0.8, 122.5}, {0.7, 144.5}, {0.6,
175.9}}
I also come across the same problem if I input the exact code from the examples in the PlotLegend file in the documentation centre. The first graph plots in the notebook but the second one in the example plots in the messages window.
Thanks for your help.
URL: , |
|