# How to change plotting options while using Map

I have multiple series, which I want to plot using ListLinePlot and Map. For example

datamatrix = RandomInteger[{1, 9}, {20, 3}];
ListLinePlot /@ Transpose[datamatrix]


By doing this, I can plot all three series. I am trying to specify different plotting options for my different graphs. For example, I want to apply different titles (Title1, Title2, Title3 for illustration purpose) and different colors to my graphs (Red,Green and Pink for illustration purpose). If possible, I want to specify different DataRange.

datamatrix = RandomInteger[{1, 9}, {20, 3}];
styles = {Directive[Thick, Red], Directive[Thick, Green],  Directive[Thick, Blue]};
titles = ToString /@ {title1, title2, title3};
ListLinePlot[#, PlotStyle -> #2, PlotLabel->#3] & @@@
Transpose[{Transpose[datamatrix], styles,titles}]


ListLinePlot[#, PlotStyle -> Directive[Thick, Hue[RandomReal[]]]] & /@Transpose[datamatrix]


• @ kguler Thanks. You guys are smart. I always imagine and post a question, somebody like you will answer. Thanks for your contribution to this forum. Commented Nov 30, 2014 at 17:30
• @rka, thank you for the kind words.
– kglr
Commented Nov 30, 2014 at 17:33

An alternative approach would be to use MapThread, which avoids one Transpose. I also created the titles a different way using Array, purely for didactic purposes of showing how to automate these things. Note that you can avoid using Directive in this way by setting BaseStyle.

datamatrix = RandomInteger[{1, 9}, {20, 3}];
colors = {Red, Green, Blue};
titles =  Array["Title " <> ToString[#] &, 3];
Grid[{MapThread[ListLinePlot[#, PlotStyle -> #2, PlotLabel -> #3,
BaseStyle -> Thick] &, {Transpose[datamatrix], colors, titles} ]},
ItemSize -> Full]


• @ Verbeia, thank you for taking time to answer this question. Commented Dec 1, 2014 at 3:13