Contour plot with filled colors (for x, y, z data)
10 ビュー (過去 30 日間)
古いコメントを表示
Hello everyone!
I have a dataset that contains Latitude, Longitude and depth/height of a particular area. What I want to do is plat a contour map using the data and I'm more interested in the possiblity of reformatting the output contour map as following figure.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/286161/image.png)
How can I achieve this using the original data set?
(A sample Data set is attached.)
TIA!
2 件のコメント
Mehmed Saad
2020 年 4 月 21 日
create your custom color map and apply on your contour. i think this will work
回答 (1 件)
KSSV
2020 年 4 月 21 日
x = A(:,1) ; y = A(:,2) ; z = A(:,3) ;
%%structured
xi = unique(x) ; yi = unique(y) ;
[X,Y] = meshgrid(xi,yi) ;
Z = reshape(z,size(X)) ;
figure
surf(X,Y,Z)
%%unstructured
dt = delaunayTriangulation(x,y) ;
tri = dt.ConnectivityList ;
figure
trisurf(tri,x,y,z)
For colormaps refer:
5 件のコメント
KSSV
2020 年 4 月 21 日
You can also use patch. I have shared a link right....check in there, do you have that colormap.
参考
カテゴリ
Help Center および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!