How to add more information to plot help-box?
6 ビュー (過去 30 日間)
古いコメントを表示
You know that little help-box which shows up when you mouse over a data point in a plot and tells you its coodinates? I noticed that with scatter plots the box also displays the size of the point, so I was wondering if there's a way to make it show other data. I have a plot with several lines, each with a corresponding number, and I want to be able to tell which line has which number. I'd rather not use colors and a legend since I'm already using color as a distinguishing feature. I also thought of giving each line a z-value corresponding to the number I care about, but that seems both annoying to implement and has the issue of forcing a single stacking order, when I need to be able to choose which line is on top. Hence my question about if it's possible to manipulate what shows up in the help-box.
Thanks in advance!
0 件のコメント
採用された回答
Walter Roberson
2023 年 10 月 29 日
In the particular case of what MATLAB refers to as "chart objects" (which it does not define to users), there is a completely different mechanism available which is introduced at https://www.mathworks.com/help/matlab/creating_plots/create-custom-data-tips.html "Examples of objects with a DataTipTemplate property include Line, Histogram, Surface, and FunctionLine objects."
(An example of something that does not have DataTipTemplate is a patch() object)
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!