I'm working with a ListPlot of several points.
I'd like to plot the points with a gradient of colors (for example, from blue to red) following their position in the x-axes.
For example:
x = {0,1,2,3,4,5,6,7,8,9,10};
y = {1,3,5,3,1,4,7,10,5,0,1};
data = Transpose@{x, y};
myplot = ListPlot[data]
That plots appears as:
I'd like to have a continuous change of the markers' colors, from blue tonalities in the left (near to x = 0) to red tonalities in the right (near x = 10).
What command should I use inside the ListPlot?
Thank you very much for your time!
ListPlot
: reference.wolfram.com/language/ref/ListPlot.html#1706009447 $\endgroup$