MATLAB: How to change colour of data points depending on value of the data (i.e data range)

patches

How do you change the color of data points (using a colormap) depending on value of a third variable. Patches??
Longitude = Pos(: , 1);
Latitude = Pos(: , 2);
plot(Longitude, Latitude);
hold
Data = Pos(: , 3);

Best Answer

pointsize = 12;
scatter(Longitude, Latitude, pointsize, Data)