Suppose I have a uitabgroup with multiple uitabs. In each tab, a plot of some analyzed data is shown. How do I code the uitabgroup or each uitab so that, when the analyzed data is changed, the old graph REMAINS in the uitab to be plotted against. I am operating inside of a while loop. I've tried the 'hold on' function many different ways but to no avail
My code looks something like shown below. I'd paste the code directly but it is far too long. No other functionality than what is shown has been applied. Thanks in advance
h_figure_1 = figure(1);h_tabgroup = uitabgroup(h_figure_1);tab1 = uitab(h_tabgroup,'Title','y relative to z');tab2 = uitab(h_tabgroup,'Title','y relative to z and n'); start =1; while start == 1 % Ask user to upload data for z and n, given x and y
axes('parent',tab1) plot(x,y/z) axes('parent',tab2) subplot(2,1,1) plot(x,y/(z+n)) subplot(2,1,2) plot(x,y/n) start = input('Run again? 1 - yes, 0 - no'); end
Best Answer