How to set PointDataTip properties and set DataTipStyle

11 vues (au cours des 30 derniers jours)
Ronald Ouwerkerk
Ronald Ouwerkerk le 5 Avr 2021
I want to make an interactive plot to select portions of a line graph. I want to use the datatip functionality to display X and Y coordinates, but not on the point in the graph. Instead I want this to be in the bottom right hand corner or any other position thast does not overlap with the lineplot.
I noticed that moving the cursor over any plot can procuce a number of datatip windows that won't go away. I Found the remedy by using
delete(findall(fh,'Type','hggroup'));
Now I want to move the position of the datatip to a unused corner of the graph (and not get a multityde of datatips whenever I click on the graph).
I tried
dcm=datacursormode(figurehandle);
set( dcm, 'DisplayStyle', 'window')
This does not make a difference in the datatip window appearance of behaviour.
I tried
dth = findall( figurehandle,'Type','hggroup'); get( dth )
and found a promising attribute DataTipStyle: MarkerAndTip
I then searched the Help window and the website for possible v alues of this property and what it does and I found nothing! I used to be able to right click on a datatip and chnage the display style to 'window'. This would be what I want, but I woul like to set it explicitly in the script to create the interactive graph.
How can I do this? (I am stil runnoing R2019a because the installation of R2020 was a disaster giving me errors on all graphics and help just stopped).

Réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by