a simple line plot in an uiaxes in AppDesigner leads to error messages

조회 수: 7 (최근 30일)
Mario Schwarz
Mario Schwarz 2020년 2월 18일
편집: Brandon Eidson 2020년 4월 2일
I am working in AppDesigner and I create an uiaxes where i simply plot some lines. When the mouse is near the plotted line i get a bunch of errormessages in the command window:
Warning: Error occurred while executing the listener callback for event MouseMove defined for class
matlab.graphics.interaction.graphicscontrol.InteractionObjects.DataTipInteraction:
Error using hgconvertunits
The reference object is invalid.
Error in getpixelposition
Error in getpixelposition
Error in getpixelposition
Error in brushing.select.translateToContainer
Error in matlab.graphics.interaction.uiaxes.Datatips
Error in matlab.graphics.interaction.actions.Linger/motionCallback
Error in matlab.graphics.interaction.actions.Linger
Error in
matlab.graphics.interaction.graphicscontrol.InteractionObjects.DataTipInteraction/actionevent
Error in matlab.graphics.interaction.graphicscontrol.InteractionObjects.InteractionBase
Error in matlab.graphics.interaction.graphicscontrol.GenericControl/process
Error in matlab.graphics.interaction.graphicscontrol.layoutable.LayoutableControl/process
Error in matlab.graphics.interaction.graphicscontrol.AxesControl/process

답변 (2개)

Jalaj Gambhir
Jalaj Gambhir 2020년 2월 28일
편집: Jalaj Gambhir 2020년 2월 28일
Hi,
This issue occurs when we try to plot mixed datatypes in UIAxes in R2019a. This has been fixed in R2019b.
Meanwhile for R2019a, you can try a workaround for disabling the errors/warnings.
plot(....) % Your plot command
ax = gca;
disableDefaultInteractivity(ax)

Brandon Eidson
Brandon Eidson 2020년 4월 2일
편집: Brandon Eidson 2020년 4월 2일
I had a similar issue. I was working with uint's. I found if I plotted my data as double, I no longer received the constant warning.
e.g.
plot(app.UIAxes, xData, double(yData))

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by