X Y scatter data Color Contour of Frequency Distribution spatially in 125km circle
Show older comments
I have X-Y scatter data. I plotted Frequency Distribution spatially with 5km box resolution, I need values outside 125km radius to show white instead of 0. I understand NaN is the option. How do I implement NaN selectively through code
my code is
binmin = -125; binmax = 125; binwidth = 5;
xbin = 1 + floor((X(:) - binmin) / binwidth);
ybin = 1 + floor((Y(:) - binmin) / binwidth);
nbins = ceil((binmax - binmin) / binwidth);
counts = accumarray([xbin, ybin], 1, [nbins, nbins]);
figure(1)
surf(counts,'EdgeColor','none','LineStyle','none');
view(-270,-90);
any help shall be appreciated
Answers (1)
Walter Roberson
on 4 Feb 2016
0 votes
Categories
Find more on Contour Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!