I'm using ListLinePlot to plot a list containing 10 lists, using the default colors:


I would like to be able to keep the default PlotStyle options for the 9 first lists, but not for the last one. I tried to do:

myStyle = Append[Table[{Automatic}, {9}], {Green,Thickness[0.01]}];
ListLinePlot[myList, PlotStyle -> {myStyle}]

but all the lists are plotted in {Green,Thickness[0.01]}

What's the best way to do that?

  • $\begingroup$ The problem is just a syntax error. Maybe the question is still useful, to demonstrate how the fonctionality can be achieved ? $\endgroup$ – andre314 Feb 25 '13 at 14:43
  • $\begingroup$ Why don't you use Show? That's what it is for. $\endgroup$ – rcollyer Feb 25 '13 at 15:05
myList = Sort /@ RandomReal[1, {10, 100}];
myStyle = Append[Table[Automatic, {9}], Directive[{Green, Thickness[0.01]}]]; 
ListLinePlot[myList,  PlotStyle -> myStyle]

enter image description here

| improve this answer | |

replace {myStyle} by myStyle

 myStyle = Append[Table[{Automatic}, {9}], {Green, Thickness[0.01]}];
 ListLinePlot[myList, PlotStyle -> myStyle]
| improve this answer | |
  • $\begingroup$ erf so stupid... thanks! $\endgroup$ – Sulli Feb 25 '13 at 14:37
  • $\begingroup$ I would be good if the question was corrected from this problem. Then I delete my answer (don't care the +20 of rep). $\endgroup$ – andre314 Feb 26 '13 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.