Mesh graph, Legend ?

20 ビュー (過去 30 日間)
parnal patni
parnal patni 2018 年 12 月 6 日
回答済み: Ananya Tewari 2020 年 6 月 18 日
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?

回答 (1 件)

Ananya Tewari
Ananya Tewari 2020 年 6 月 18 日
Hi,
Legends can be added to all sorts of graph present in MATLAB.
You can have a look at
%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

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by