Deformed plots and extra windows plotting in matlab app.designer

I am the same person of the previous question. So I am trying to design an app which, when I click on the button, a circle is drawn in the pannel. This is the code I have written to let this happen:
And this is the result:
As you can see, the circunference is deformed. So, to avoid that, to have the pannel gridded and to hold on the graph for future simultaneous plots, I add axis equal, grid and hold on in the code (as I would do the same for the matlab command window) as you can see below:
When I run the app and click the button, appears the same deformed circle and an extra window (figure 1 ) with nothing on it as you can see:
How can I get rid of that annoying extra window (Figure 1) and how can I achieve axis equal, hold on and grid commands to be executed?
Thank you very much!

 Respuesta aceptada

Adam Danz
Adam Danz el 17 de En. de 2021

4 comentarios

Thanks for your reply!
I have tried that, as you can see in the following code (I think I did it well) but still appears the extra window and the circle is not perfectly drawn
The result:
Adam Danz
Adam Danz el 17 de En. de 2021
Editada: Adam Danz el 17 de En. de 2021
All of the plotting commands need handle inputs including axis(), hold(), grid().
BTW, the images of your code are helpful to see what's going on but we cannot copy-paste the text in images. Sometimes it's helpful to copy-paste the text so we can show you examples without rewriting all of the code. For example, grid(app.panel, 'on') (assuming app.panel is the handle to the axes).
I made this:
and this is the result:
It works perfectly. Thanks for your help! However, as long as I can see, the X and Y limits specification is not necessary. The difference that I can tell is that with X and Y limits, the plot is on scale, whthout them, the drawing just occupies all the window
That's correct, they are not related to the data aspect ratio controlled by axis equal.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Centro de ayuda y File Exchange.

Productos

Versión

R2019b

Preguntada:

el 17 de En. de 2021

Comentada:

el 17 de En. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by