Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is what I am trying to plot:

randomWalk := NestList[# + RandomReal[{-1, 1}] &, 0, 1000];
Show[Table[ListPlot[randomWalk, Joined -> True], {100}], PlotRange -> Automatic]

Which gives:

enter image description here

What I'd like to do is give the lines a bit of transparency so that it is clearer to see the density of the plot at various areas; i.e. the darker the area, the more overlapping lines there are at that point. Since this is a ListPlot though, how can you change the properties - i.e. opacity - of the lines?

share|improve this question
up vote 5 down vote accepted

Putting the table inside ListPlot and setting the Opacity as part of the PlotStyle:

  Table[randomWalk, {100}], 
  PlotStyle -> Directive[Blue, Opacity[0.25]], Joined -> True]

enter image description here

share|improve this answer
PlotStyle -> Opacity[1/5, Black] also works. – Alexey Popkov Apr 30 '14 at 15:31
@Alexy - This one will run and run ;) – Ymareth Apr 30 '14 at 15:33
Brilliant, thank you @Ymareth and Oska – Aron Apr 30 '14 at 16:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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