Tag Info

Hot answers tagged

3

Perhaps you mean something like this? SeedRandom[1]; classes = {1, 2, 3}; data = Transpose[{Range[100]^2, RandomChoice[classes, 100]}]; ListPlot[classes /. GroupBy[MapIndexed[First /@ {#2, #1} &, data], data[[First@#, 2]] &], Filling -> Axis, FillingStyle -> Thick] Alternate solution dataIF = Interpolation[data[[All, 1]], ...


1

If I understand correctly, you want something like this: val1 = Array[Sin, 100, {0, 2 Pi}]; class1 = "a"; val2 = Array[Cos, 100, {0, 2 Pi}]; class2 = "b"; data = {{val1, class1}, {val2, class2}}; fillingstyle = Table[i -> {Axis, data[[i, 2]]}, {i, Length@data}]/.{"a" -> Gray, "b" -> Pink}; ListLinePlot[Transpose[data][[1]], Filling -> ...



Only top voted, non community-wiki answers of a minimum length are eligible