How to revert graphs.

14 views (last 30 days)
Evan Oswald
Evan Oswald on 15 Jul 2019
Answered: dpb on 15 Jul 2019
I am using a program in which an accelerometer records and plots data. From there you can save the plots and run the program again to collect more data and plot it. If I decide not to save the new data, the axes on my gui retain the unwanted data. I would like to see the plots of the data that I had originally saved, rather than the data I don't want. How can I revert the plots to their former data?

Answers (1)

dpb
dpb on 15 Jul 2019
Basically, don't erase/delete anything until you're sure you're done with it. Save the line handle(s) to the lines when drawn; if you want to hide them temporarily, set hL(idx).Visible='off' for those when create the next set (with a new entry in the line handles array so you don't lose the previous, of course).
When you decide you are satisfied and don't want the earlier, then you can delete() those particular line handles and reuse that array element(s).
To go back, delete() the current array entry lines and return the .Visible property to 'on' again.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!