Error when checking data points in plot

조회 수: 6 (최근 30일)
Isaac De La Cruz
Isaac De La Cruz 2025년 9월 25일
답변: Isaac De La Cruz 2025년 10월 27일
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!

채택된 답변

dpb
dpb 2025년 9월 25일
편집: dpb 2025년 9월 25일
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
Isaac De La Cruz
Isaac De La Cruz 2025년 9월 26일
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 2025년 9월 26일
편집: dpb 2025년 9월 26일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Isaac De La Cruz
Isaac De La Cruz 2025년 10월 27일
All, just reinstalled MATLAB R2022b and the issues were gone.
So, the issue was related to a bad installation,
Thanks for the support!

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by