Plotting multiple lists with Hue colors in Mathematica

1 reply · 2K views · last reply
brydustin
Messages
201
Reaction score
0
I want to take a set of lists {list1, list2, list3, ..., list N} and plot them with color according to the following rule:Color set = { Hue[1-0.] , Hue[1/2], Hue[1/3], ... Hue[1/N] }
For any arbitrary number of sets... where Hue[1-0.] is used because Hue[1] is not defined.
 
Something like the following?

Code:
n=10; k=100;
data=Range[1, n] + RandomReal[{0, 1}, {n, k}];
hues=Table[Hue[1/j], {j, n}];

ListPlot[data, Joined->True, PlotStyle->hues]
Line plot of ten jagged random-noise series stacked vertically, each offset upward, colored in a hue gradient from red at the bottom through green and cyan to orange and yellow at the top; x-axis runs 0 to 100, y-axis labeled 2, 4, 6, 8, 10.



I'm not sure what you mean by Hue[1] not being defined
Code:
GraphicsRow[{Graphics[{Hue[1], Disk[]}], Graphics[{Hue[1.], Disk[]}]}]
Two solid red filled circles of equal size placed side by side on a white background.
 
Attachments
  • Line plot of 10 noisy traces stacked vertically, colored in a hue gradient from red at the bottom through green and cyan to yellow and orange at the top. The x-axis runs from 0 to 100 and the y-axis is labeled 2, 4, 6, 8, 10.
    Hues.png
    12.9 KB · Views: 472
  • Two solid red filled circles of equal size placed side by side on a white background.
    Disks.png
    1.1 KB · Views: 521