Plotting Circles onto Mercator Projection
Show older comments
I'm trying to plot some points/circles onto a mercator projection. I have a set of points that I'm trying to iterate through and then plot using viscircles(). First of all I know there is an issue with my for loop/iteration method and I'm also unsure how to map these circles onto the projection using the same scale, it seems they plot onto a separate grid. Any help would be appreciated.
clc;
axesm ('mercator', 'Frame', 'on', 'Grid', 'on');
setm(gca,'grid','on','meridianlabel','on','parallellabel','on')
hold on;
Y = [59.48009333,-2.000406383,30.32394415,14.14142775,61.0865661,208.7017845,34.99211074,
-11.06820382,51.92576036,124.4534127,61.0865661,54.85881019,86.31346951,-15.17434314,
26.94120238,57.90788095,3.001371616,24.73428577,49.09690232,116.1723159,33.80639443,-8.026121537,14.14142775, 61.0865661];
X = [6, 8, 11, 19, 45, 53, 113, 119, 120, 147, 169, 179, 180, 189, 216, 238, 248, 253, 288, 314, 338, 340, 341, 344];
for r = 1:Y
for s = 1:X
centers = [X(s), Y(r)];
radii = 1;
viscircles(centers,radii,'Color', 'r');
end
end
hold off;
Answers (0)
Categories
Find more on Mapping Toolbox 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!