【发布时间】:2018-11-28 05:48:58
【问题描述】:
我尝试使用 Plotting Points on a Map in MATLAB 在 matlab 的地图上绘制点,但由于某种原因,该点不会出现。 这是我的代码。
figure('visible','on');
%%% Set the map boundaries
hi_lat=43.86;
lo_lat=41.23;
hi_lon= 6.08;
lo_lon=2.21;
%%% Plot
worldmap ([lo_lat hi_lat], [lo_lon hi_lon]) % lat and lon bounds of your plot
geoshow('landareas.shp','FaceColor', 'green', 'EdgeColor', [0 0 0])
geoshow('worldcities.shp', 'Marker', '.',...
'Color', 'red')
labelLat = 43.5;
labelLon = 5.35;
textm(labelLat, labelLon, 'Marseille')
framem off; gridm off; mlabel off; plabel off
lat=3.13;
lon=42.48;
geoshow(lat,lon, 'DisplayType', 'Point', 'Marker', '+', 'Color', 'red'); %Part of the code that's not doing what I want it to do.
hold on
我如何绘制另一个点?为什么不会出现?
【问题讨论】:
-
您可能想要切换纬度和经度值。与马赛的价值观相比,您似乎在世界的另一端画了一条点路。