Hold plot after each push button press GUI
3 views (last 30 days)
Show older comments
Tyler Murray on 13 Dec 2016
Commented: Tyler Murray on 14 Dec 2016
I am trying to implement a "hold on" feature in my gui where the user can select and set of data and plot it on the same graph as the previous data. I saw one forum on here that helped but I am running into an issue. The code is:
ah = findobj(0,'Type','axes','Tag','MyPlotAxes');
fh = figure('Name','Simulation','NumberTitle','off');
ah = axes('Parent',fh, 'Tag', 'MyPlotAxes');
plot(ah, x, y);
The two sets of data do plot on one graph, however the axes of the figure becomes pasted as the background of the GUI. I have tried redefining the axes specific to each plot but have had no luck.
Find more on Interactive Control and Callbacks 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!