MATLAB App Designer hold on/off throwing warnings

11 visualizaciones (últimos 30 días)
rohit
rohit el 2 de Nov. de 2020
Comentada: J. Alex Lee el 3 de Nov. de 2020
I'm beginner and trying to use polarplot and hold on/off in MATLAB App Designer. Now to use this in app designer, we need to create the polar axes by calling the polaraxes function in the app designer panel container.
I tried this which is working fine without any error:
pax = polaraxes(app.Panel);
polarplot(pax,th,r1,'red')
hold(app.UIFigure.CurrentAxes,'on'); % warning
polarplot(pax,r2,'green')
hold(app.UIFigure.CurrentAxes,'off'); % warning
But due to app coding alerts, I'm getting the warning "Specify a UIAxes handle as first argument" for the hold line. How do I resolve this warning ? Is this the correct way to use hold on/off for the panel container?

Respuesta aceptada

J. Alex Lee
J. Alex Lee el 2 de Nov. de 2020
I would set the "NextPlot" property of the polar axes to "add".
pax.NextPlot = 'add';
  2 comentarios
rohit
rohit el 3 de Nov. de 2020
And for hold off, I should use :
pax.NextPlot = 'replace';
Right?
J. Alex Lee
J. Alex Lee el 3 de Nov. de 2020
yes. there's really no need to switch back to that after you've finished all your plots, or at least i can't see any reason.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by