MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Multiple Line coloring and Dashing in ListPlot


The colors do not repeat but the differences are subtle. Using PlotMarkers
is easier than varying dashing.


$Version


"8.0 for Mac OS X x86 (64-bit) (October 5, 2011)"


data = Table[RandomReal[{2 i, 2 i + 1}, {20}], {i, 9}];


llp1 = ListLinePlot[data, PlotMarkers -> Automatic]


llp2 = ListPlot[data, PlotMarkers -> Automatic, Joined -> True]


There are nine different colors in each plot


(Cases[#, Hue[__], Infinity] // Union // Length) & /@ {llp1, llp2}


{9, 9}



$Version


"9.0 for Mac OS X x86 (64-bit) (January 24, 2013)"


data = Table[RandomReal[{2 i, 2 i + 1}, {20}], {i, 9}];


llp1 = ListLinePlot[data, PlotMarkers -> Automatic]


llp2 = ListPlot[data, PlotMarkers -> Automatic, Joined -> True]


There are nine different colors in each plot


(Cases[#, RGBColor[__], Infinity] // Union // Length) & /@ {llp1, llp2}


{9, 9}



Bob Hanlon




On Wed, Jul 3, 2013 at 5:01 AM, graser <graser at gmail.com> wrote:

> Dear Mathematica Users,
>
> I have a question about the coloring and dashing lines in listplot.
> For example, Let's say there is a multiple data set like
> data = Table[RandomReal[{2 i, 2 i + 1}, {20}], {i, 9}];
>
> I want to plot them in listplot or listloglogplot with all different color
> and all different dashing with (joined -> True).
> How can I do it automatically or minimum option?
> The default number of coloring in mathematica (I am in still 8) is 4.
> after that, it repeat same color.
>
> please help me!
>
> Thanks!
>
>
>




  • Prev by Date: Re: Changing a list with the information of other
  • Next by Date: Re: Define function using lists or tables
  • Previous by thread: Multiple Line coloring and Dashing in ListPlot
  • Next by thread: Re: Multiple Line coloring and Dashing in ListPlot