%% Create Geographic Density Plot
% Set up latitude and longitude data.

lon = linspace(-170,170,3000) + 10*rand(1,3000);
lat = 50 * cosd(3*lon) + 10*rand(size(lon));

%
% Specify weights for each data point.

weights = 101 + 100*(sind(2*lon));

%
% Create the geographic density plot, specifying the colors used with the plot.

geodensityplot(lat,lon,weights,'FaceColor','interp')

%
% Copyright 2018 The MathWorks, Inc.