Inserting black lines on pcolor plot
16 ビュー (過去 30 日間)
古いコメントを表示
I have a matrices of values which I want to use to create a pcolor plot.
My data is constrained by water depths where I have set all depth >100m to NaN and all values of 0 to NaN.
This has created a confusing plot where I'm unable to show coastal outlines properly.
How would I change this plot so that I retain my '0 depth' or land values but create a black outline that will clearly show the outline of the coasts.
Thanks.
0 件のコメント
採用された回答
KSSV
2022 年 9 月 4 日
Let X, Y, H be your data of (x,y) coordinates and H be your depth.
figure
hold on
pcolor(X,Y,H)
shading interp
contour(X,Y,H,[0 0],'k')
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Coastal Engineering についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!