Disable just hover interactivity (but preserve dataTip on click)

26 次查看(过去 30 天)
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).

回答(1 个)

Nidhi Mittal
Nidhi Mittal 2020-11-4
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 个评论
AMM
AMM 2020-11-12
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by