Manipulate[
ListPlot[
{
Thread[{Range[1, 10, s], Range[1, 10, s]}],
Range[1, 10, 1]
},
Filling -> Axis,
GridLines -> Automatic,
GridLinesStyle -> {{Gray, Dotted}, {Gray, Dotted}},
Frame -> True,
PlotRange -> {{0.8, 10}, {0, 10}}
],
{s, {1, 0.5, 0.25, 0.125, 0.10}}
]
Default, the s=1 graph is always there (in orange) when clicked on s=0.5, I made it look like the new points in blue are added on.
How could I improve the code, so that when I click on s=0.25, only show the "new points" in a different color? and so on.
For example, when click on s=0.25, the lines from s=1 stay in orange, the lines from s=0.5 stay blue, and the new lines from s=0.25 show in red.
Thanks.
Range[1, 10, 1]
as the second item to be plotted. You plotThread[{Range[1, 10, s], Range[1, 10, s]}]
andRange[1, 10, 1]
, so of courseRange[1, 10, 1]
will always be there. Maybe I didn't quite understand what you want to achieve. $\endgroup$ – Felix Feb 9 '17 at 16:49