Plot a line parallel to map axis
3 ビュー (過去 30 日間)
古いコメントを表示
Hello:
I wish to plot a straight line parallel to the tropics, i.e., [0,0] to [-180, 180] over the world map defined over map axis ax. I have tried geoplot but its not working. Pls. advice. I also want to set different colors and line thickness and plot another set of lines parallel to tropics but across [-23,23] to [180,180] showing tropical regions.
0 件のコメント
採用された回答
Dyuman Joshi
2023 年 9 月 2 日
編集済み: Dyuman Joshi
2023 年 9 月 2 日
Answer according to the information available -
figure
%Create map axes
mx1 = mapaxes;
land = readgeotable("landareas.shp");
%plot world map
geoplot(land)
hold on
%Add plots for tropical lines
geoplot([23 23],[-180 180],'r-','LineWidth',1)
geoplot([-23 -23],[-180 180],'g--','LineWidth',1.5)
5 件のコメント
Dyuman Joshi
2023 年 9 月 2 日
編集済み: Dyuman Joshi
2023 年 9 月 2 日
@Poulomi Ganguli How about this?
ax=axesm('mercator');
f=worldmap([-60 80],[-180 180]);
load coastlines
geoshow(coastlat, coastlon)
%Define coordinates for tropical lines
yvec = -180:180;
xvec = ones(size(yvec));
geoshow(23*xvec,yvec,'DisplayType','Line','LineWidth',0.75,'Color',[1 0 0])
geoshow(-23*xvec,yvec,'DisplayType','Line','LineWidth',1.5,'Color',[0 1 0],'LineStyle','--')
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Geographic Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!