I have a bunch of GPS-data from a soccer game (as a referee). I would like to create a heat map, so that it is clear where you spent most of the time in the field. So this means a red color when there are a lot of dots close to each other and blue color when there are no dots or the dots are far from each other.
Someone an idea how to do this in Matlab?
You can use the dscatter file written by Robert Henson.
Sample example:
addpath(genpath('../src_plot'));
X = randn(1000,1);
Y = randn(1000,1);
dscatter(X, Y, 'plottype', 'image');
colormap('jet')
You can use 'surf'
, 'mesh'
, 'contour'
instead of image according to what you expect.
来源:https://stackoverflow.com/questions/35565227/create-heat-map-from-gps-data-in-matlab