Disable just hover interactivity (but preserve dataTip on click)

28 visualizaciones (últimos 30 días)
AMM
AMM el 25 de Jul. de 2020
Comentada: AMM el 12 de Nov. de 2020
In R2020a (Update 4), is there a way to disable the appearance of data tips upon hover, but still allow them to appear when a point on a plot is clicked?
I've read the dataTipInteraction docs pretty carefully, but the description there makes it sound like all three triggers (hover, click, tap) are lumped together—I don't see a way to disable them individually. This is frankly a bit maddening, since I don't want or need to see a sequence of data tip popups[1] as I move the cursor across a figure window enroute to clicking on a particular point of interest. I just want them to appear when I click on the point. I already experimented with enabling/disabling the default interactivity for a given set of axes—but as with the description to which I linked above, this seems to affect all interactions together. Is it the case that hover, click and tap are lumped together by design? Or am I just being obtuse?
Thanks in advance for any guidance!
-AMM
[1] Sluggishly rendered, at that—and despite following Yair Altman's detailed writeup on this pretty carefully, I don't see any noticeable speed improvement at all. They're still dog-slow, and this is on a MacBook Pro with 8GB of memory running Mojave (10.14.6), with Source Control Integration disabled and the Java Heap Memory increased to 1GB (default is 768 MB).

Respuestas (1)

Nidhi Mittal
Nidhi Mittal el 4 de Nov. de 2020
Hi AMM,
You can disable the appearance of data tips upon hover using disableDefaultInteractivity(ax) .
This functionality is available in 2018b and later releases.
Thanks,
Nidhi Mittal
  1 comentario
AMM
AMM el 12 de Nov. de 2020
Hi Nidhi,
Perhaps I wasn't concise enough in my original post. If you re-read my question carefully, you'll see that:
  1. I included an explicit link (under the word "disabling") to the exact function you now suggest; and
  2. As the title of my post states, I am interested in disabling only the show-on-hover dataTips. Your suggestion disables all interactions; as I wrote, "this seems to affect all interactions together." This is not what I want.
Or did I misunderstand you?
Thanks,
-AMM

Iniciar sesión para comentar.

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by