How to plot coast and fill the land with gray without m_map

10 ビュー (過去 30 日間)
silvia zhou
silvia zhou 2020 年 9 月 23 日
コメント済み: KSSV 2020 年 9 月 27 日
Dear all,
I have detailed shoreline data. I want to fill the land after ploting the coast. But I don't want to use m_map.
Thank

採用された回答

KSSV
KSSV 2020 年 9 月 23 日
To fill the land use patch/ area/ fill. Read about those functions. To simply plot the coastline use plot.
  2 件のコメント
silvia zhou
silvia zhou 2020 年 9 月 27 日
I failed
KSSV
KSSV 2020 年 9 月 27 日
load m_coasts.mat ;
% Get nan's
idx = all(isnan(ncst),2);
idr = diff(find([1;diff(idx);1]));
D = mat2cell(ncst,idr(:),size(ncst,2));
figure
hold on
for i = 1:length(D)
patch(D{i}(:,1),D{i}(:,2),'b')
plot(D{i}(:,1),D{i}(:,2),'k')
drawnow
end

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by