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
    Commented Feb 25, 2013 at 14:43
  • $\begingroup$ Why don't you use Show? That's what it is for. $\endgroup$
    – rcollyer
    Commented Feb 25, 2013 at 15:05

2 Answers 2

myList = Sort /@ RandomReal[1, {10, 100}];
myStyle = Append[Table[Automatic, {9}], Directive[{Green, Thickness[0.01]}]]; 
ListLinePlot[myList,  PlotStyle -> myStyle]

enter image description here


replace {myStyle} by myStyle

 myStyle = Append[Table[{Automatic}, {9}], {Green, Thickness[0.01]}];
 ListLinePlot[myList, PlotStyle -> myStyle]
  • $\begingroup$ erf so stupid... thanks! $\endgroup$
    – Sulli
    Commented Feb 25, 2013 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
    Commented Feb 26, 2013 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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