yyaxis not working in app designer.
Mostrar comentarios más antiguos
Hi, I'm trying to plot a line on both the left and right side of a UIAxes in App Designer with the command yyaxis(myAxes, 'left'). I stripped down the problem to its most simple expression, a single figure with a UIAxes in it.

When I click on the graph I get that error:
Warning: Error occurred while executing the listener callback for event WindowMousePress defined for class
matlab.ui.Figure:
Unrecognized method, property, or field 'processFigureHitObject' for class 'matlab.ui.control.UIAxes'.
Error in matlab.graphics.internal.YYAxisEventManager
Error in matlab.graphics.internal.YYAxisEventManager
The code in the startupFcn is:
yyaxis(app.UIAxes, 'left');
x = pi:0.1:3*pi;
y = sin(x);
plot(app.UIAxes,x,y);
I use Matlab R2019b.
Anyone got an idea?
4 comentarios
Ankit
el 8 de Nov. de 2019
Following code works for me in 2018b. Have you tried including the right axis and still you face the same problem?
function startFcn_Callback(app)
yyaxis(app.UIAxes, 'left');
x = pi:0.1:3*pi;
y = sin(x);
plot(app.UIAxes,x,y);
yyaxis(app.UIAxes,'right');
x = pi:0.1:3*pi;
y = cos(x);
plot(app.UIAxes,x,y);
end
David Levesque
el 8 de Nov. de 2019
Tested in r2019b on my end and it threw the same warning (not an error). I didn't have more time to look into it.
The warning occurs when you click on an object within the UIAxis but not when you click on the axis background itself.
Adam Danz
el 15 de Nov. de 2019
Mark Gerber 's answer moved here as a comment.
I am experiencing similar problems.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Develop Apps Using App Designer en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
