Probing a plot based on colormap information
14 ビュー (過去 30 日間)
古いコメントを表示
How can I probe a plot with colormap data?
As you see, in this case, it only shows the xyz coordinates which is not really useful. I want to be able to see the colormap value (between 0 and 1).
Any ideas? I am using the trisurf function.
0 件のコメント
採用された回答
Simon Chan
2022 年 3 月 11 日
Try function datatip & dataTipTextRow if your MATLAB version is after 2019b.
[x,y] = meshgrid(1:15,1:15);
z = peaks(15);
T = delaunay(x,y);
s = trisurf(T,x,y,z);
dt = datatip(s);
s.DataTipTemplate.DataTipRows(end+1) = dataTipTextRow('Colormap Value',T,'%.1f');
9 件のコメント
Simon Chan
2022 年 3 月 11 日
Add another line :-)
s.DataTipTemplate.DataTipRows(end+1) = dataTipTextRow('Colormap Value',repmat(s.CData,1,3),'%.3f');
s.DataTipTemplate.DataTipRows(1:3)=[]; % Add this line as well
delete(dt);
その他の回答 (1 件)
KSSV
2022 年 3 月 10 日
I don't think you would be able to see the values like that. But you can see what value it has using:
F = scatteredInterpolant(x,y,z,c) ;
ci = F(xi,yi,zi) ; % where xi, yi, zi is the picked point
5 件のコメント
Simon Chan
2022 年 3 月 10 日
Choose figure object
f = figure;
ax = gca;
d = datacursormode(f)
d2 = datacursormode(ax)
参考
カテゴリ
Help Center および File Exchange で Orange についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!