I have been running into this issue for some time. I can not hover my mouse over a plot and have the time-value information displayed. I am using 'plot' function to display the figure.
I get this warning in the command window:
Error in matlab.graphics.interaction.actions.Linger
Warning: Error occurred while executing the listener callback for event WindowMouseMotion defined for class matlab.ui.Figure:
Undefined function 'convertDataToPickSpace' for input arguments of type 'matlab.graphics.chart.primitive.Line'.
Error in matlab.graphics.chart.interaction.dataannotatable.picking.AnnotatablePicker/convertToPickSpace (line 40)
pickLocations = convertDataToPickSpace(hContext, iter, request3D);
Error in matlab.graphics.chart.interaction.dataannotatable.picking.AnnotatablePicker/nearestSegment (line 39)
pixelLocations = obj.convertToPickSpace(hContext, varargin, valid);
Error in matlab.graphics.chart.interaction.dataannotatable.LineHelper>localGetNearestSegment (line 252)
[index1, index2, t] = utils.nearestSegment(hLine, position, isPixelPoint, data{:});
Error in matlab.graphics.chart.interaction.dataannotatable.LineHelper.getNearestPoint (line 77)
[index1, index2, t] = localGetNearestSegment(hLine, position, true);
Error in matlab.graphics.interaction.uiaxes.DataTipsBase
Error in matlab.graphics.interaction.actions.Linger/motionCallback
Error in matlab.graphics.interaction.actions.Linger
Warning says I have a missing function 'convertDataToPickSpace'.
Am I missing a toolbox?
I am using MATLAB R2022b, but have the same issue in R2024b.
Thanks in advance!

 Réponse acceptée

dpb
dpb le 25 Sep 2025
Modifié(e) : dpb le 25 Sep 2025
That you are seeing the same issue in both R2022b and R2024b would tend to indicate something incompatible in your system rather than a MATLAB issue itself.
Post a minimum working example that creates the symptom for you so folks here can try to duplicate an exact case.
I tried both
plot(randn(10,4))
close
and
hUIF=uifigure;
hAx=axes(hUIF);
plot(hAx,randn(10,4))
with R2022b and the coordinates at the points showed up under the mouse hover for both figures.
See what
which -all convertDataToPickSpace
returns at the command line. For R2022b locally, it returns
C:\MLR2022b\toolbox\matlab\specgraph\+matlab\+graphics\+chart\+interaction\+dataannotatable\+picking\@AnnotatablePicker\private\convertDataToPickSpace.m % matlab.graphics.chart.interaction.dataannotatable.picking.AnnotatablePicker method
>>
It's possible some 3rd party package did something untoward, maybe????

6 commentaires

I get:
>> which -all convertDataToPickSpace
'convertDataToPickSpace' not found.
I also don't have that function in my file explorer:
dpb
dpb le 25 Sep 2025
That indicates something has munged on your installations; I don't believe there's a "repair" functionality so looks like you would have to reinstall.
Before resorting to that, I'd suggest you call Mathworks at <Product Support Page> as they support install issues that I would consider this to be. There might be a way without resorting to a full reinstall.
Walter Roberson
Walter Roberson le 26 Sep 2025
Failure to find convertDataToPickSpace could be due to the fact that the appropriate class had not been loaded it. convertDataToPickSpace is a class method, and so would be effectively invisible until the first time the appropriate class was loaded. On my system it is located at
/Applications/MATLAB_R2025b.app/toolbox/matlab/graphics/graphics/specgraph/+matlab/+graphics/+chart/+interaction/+dataannotatable/+picking/@AnnotatablePicker/private/convertDataToPickSpace.m
At first glance, it seems unlikely that this is a subclass of matlab.graphics.chart.primitive.Line so it would seem to make sense that the method could not be found for matlab.graphics.chart.primitive.Line ... leaving open the question of how a matlab.graphics.chart.primitive.Line reached that point in the call tree.
dpb
dpb le 26 Sep 2025
Modifié(e) : dpb le 26 Sep 2025
What class wouldn't be appropriate, Walter?
From a fresh session
line(1:10,randn(1,10))
shows the datapoints...what else would a user call that wouldn't?
Asked for but @Isaac De La Cruz hasn't responded with the specific code used that causes the issue there.
If start a clean MATLAB session, then
>> which -all convertDataToPickSpace
'convertDataToPickSpace' not found.
>> line(1:10,randn(1,10))
>> which -all convertDataToPickSpace
'convertDataToPickSpace' not found.
Go hover over axes line point here and then...
>> which -all convertDataToPickSpace
C:\MLR2022b\toolbox\matlab\specgraph\+matlab\+graphics\+chart\+interaction\+dataannotatable\+picking\@AnnotatablePicker\private\convertDataToPickSpace.m % matlab.graphics.chart.interaction.dataannotatable.picking.AnnotatablePicker method
>>
So it is the act of hovering over the plot content that causes the loading, not the graphics primitive as I had sorta' presumed.
The error traceback also includes
pickLocations = convertDataToPickSpace(hContext, iter, request3D);
so wonder if the issue is it is on a 3D axes? It would help to know just how @Isaac De La Cruz created the case that causes the error; that it is in both releases indicates there is something wrong either in his use of a plotting function or actually a bug in the callback code.
It doesn't seem to me that MATLAB ought to error here, no matter...
I am not running any 3D axes, just regular 2D plot created without any customization. The warnings appear when hovering over the lines created by the plot.
Followed the steps provided by @dpb and having the same issue.
I think it may be related to a corrupted R2022b installation in my machine. I'll try reinstalling and let you know. Thanks for all the help!
(PD: my issue does not happen in R2024b, neither in R2023b, I must have confused!)
dpb
dpb le 26 Sep 2025
Modifié(e) : dpb le 26 Sep 2025
Aw-ha! That makes a lot more sense if only the one release is affected.
Meanwhile, I did test here with a 3D primitive with no issue with R2022b; although I didn't go look at the source, I presume probably request3D is a logical flag variable in the above.
Probably the reinstall will fix things; make sure to also do the latest update; fortunately, they are cumulative so don't have to do them sequentially if is more than one.

Connectez-vous pour commenter.

Plus de réponses (1)

Isaac De La Cruz
Isaac De La Cruz le 27 Oct 2025

1 vote

All, just reinstalled MATLAB R2022b and the issues were gone.
So, the issue was related to a bad installation,
Thanks for the support!

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Produits

Version

R2022b

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by