yyaxis not working in app designer.
Afficher commentaires plus anciens
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 commentaires
Ankit
le 8 Nov 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
le 8 Nov 2019
Adam Danz
le 15 Nov 2019
Mark Gerber 's answer moved here as a comment.
I am experiencing similar problems.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Develop Apps Using App Designer dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
