Mesh graph, Legend ?
조회 수: 26 (최근 30일)
이전 댓글 표시
How to put legend for Mesh Graph. The colours in the mesh graph should be added in the legend describing which colour stands for what context?
How should I achieve this function?
댓글 수: 0
답변 (1개)
Ananya Tewari
2020년 6월 18일
Hi,
Legends can be added to all sorts of graph present in MATLAB.
You can have a look at
https://in.mathworks.com/help/matlab/ref/legend.html for more understanding of legends and also have a look at thishttps://in.mathworks.com/help/matlab/ref/mesh.html
%Here is an example from the docs
[X,Y] = meshgrid(-8:.5:8);
R = sqrt(X.^2 + Y.^2) + eps;
Z = sin(R)./R;
mesh(X,Y,Z)
[X,Y] = meshgrid(-8:.5:8);
R = sqrt(X.^2 + Y.^2) + eps;
Z = sin(R)./R;
mesh(X,Y,Z)
legend({'z axis'})
Alternatively,
you can go through this MATLAB answer to have more idea about it, here the user also wants to add legend but with different surfaces
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!