# How to achieve a color gradient following the x-axes in the points of a ListPlot? [duplicate]

This question already has an answer here:

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!

## marked as duplicate by MarcoB, Jason B. plotting StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jun 27 '18 at 16:32

For ListPlot, one easy way to go is to wrap the data points in Style:
ListPlot[