4
$\begingroup$

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

ListLinePlot[myList]

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?

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

2 Answers 2

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

enter image description here

$\endgroup$
3
$\begingroup$

replace {myStyle} by myStyle

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

Your Answer

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

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