App Designer duplicates Graphs

The App Designer makes like 50 copies of my graphs and pastes them on top of each other everytime I open the app for editing. I have to go through the trouble of deleting all of them every single time. This happened to me on 2017a, 2018a and 2018b versions.

1 Comment

Do you mean opening the app into App Designer? If that's the case, you may need to contact tech support with your app, and somebody could help to get your app reparied.
The fix to duplicated components in opening App Designer apps has been in R2019a, and will also be included in R2018b Updates 3.

Sign in to comment.

Answers (1)

Would need to see your code that generates the plot to be certain, but I suspect you have hold on, and use the plot command every time to create your plot.
You could try adding cla at the start of your plotting code
cla(ax)
A more elegant solution is to create the first plot in your startup function, and then use the handle to the plot to update the plotted data. See an explanation here.

2 Comments

Hi Cris,
I am not using hold on at all. The problem is that it duplicates app.UIAxes and does not duplicate the plot on it. So basically it creates multiple app.UIAxes. This does not happen when I am running the app in the App Designer but when I close the App and reopen it for editing, I find my app with multiple duplications of app.UIAxes.
Thank You.! :)
Have you tried restarting your computer?
If after doing that you still get the same behavior, could you share your mlapp file? Attach it to your post.

Sign in to comment.

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Products

Release

R2018b

Asked:

on 18 Jan 2019

Commented:

on 30 Jan 2019

Community Treasure Hunt

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

Start Hunting!