Change data tip to your notation
15 ビュー (過去 30 日間)
古いコメントを表示
I build a graph using surf, when using data tip it shows me X,Y,Z. And I want it to show "Age", "Male", "Pron. dialog".
s=surf(X,Y,Z,);
colormap(hot);
colorbar
set(gca,'clim',[1,40]);
xlabel('Age');ylabel('Male')
%
row = dataTipTextRow("Age",s.X);
s.DataTipTemplate.DataTipRows(end+1) = row;
Unrecognized method, property, or field 'T' for class 'matlab.graphics.chart.primitive.Surface'.
Error in MalahovaSondWav (line 21)
row = dataTipTextRow("Age",s.T);
Thanks in advance
0 件のコメント
回答 (1 件)
Simon Chan
2022 年 7 月 7 日
If you would like to replace the name X,Y,Z to "Age", "Male", "Pron. dialog" respectively and display the same values, try the following:
s=surf(X,Y,Z);
colormap(hot);
colorbar
set(gca,'clim',[1,40]);
xlabel('Age');ylabel('Male')
s.DataTipTemplate.DataTipRows(1).Label = "Age";
s.DataTipTemplate.DataTipRows(2).Label = "Male";
s.DataTipTemplate.DataTipRows(3).Label = "Pron. dialog";
0 件のコメント
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!