Inserting black lines on pcolor plot
5 次查看(过去 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!