How to add more information to plot help-box?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sebastian
am 29 Okt. 2023
Beantwortet: Walter Roberson
am 29 Okt. 2023
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 Kommentare
Akzeptierte Antwort
Walter Roberson
am 29 Okt. 2023
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Specifying Target for Graphics Output finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!