all values ​​on the surf chart

조회 수: 2 (최근 30일)
Lev Mihailov
Lev Mihailov 2019년 11월 22일
편집: Adam Danz 2020년 1월 21일
1.pngI create a graph of surf (X, Y, Z, C), when I click on the graph, I will get X, Y, Z. Is there any way to get C to display ?
  댓글 수: 1
Adam Danz
Adam Danz 2019년 11월 24일
편집: Adam Danz 2020년 1월 21일
@ Lev Mihailov, if answers to your questions are helpful, accept the answer so others know it worked for you. Volunteers appreciate that feedback.

댓글을 달려면 로그인하십시오.

답변 (1개)

Adam Danz
Adam Danz 2019년 11월 22일
편집: Adam Danz 2019년 11월 22일
Here's a demo
[X,Y] = meshgrid(1:0.5:10,1:20);
Z = sin(X) + cos(Y);
s = surf(X,Y,Z);
row = dataTipTextRow('C',s.CData); % define new row to datatip
s.DataTipTemplate.DataTipRows(end+1) = row; % add new row to datatip
For more info:

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by