How do you use "hold on" with MATLAB GUI? -
I am working with GUIDE to create a larger GUI. I want to plot two set data on the same plot For the regular MATLAB code I will write:
time = 1:10; Data1 = (1:10). * 2; Data2 = (1:10). * 3; the figure; Plot (t, data1); Wait; Plot (t, data2); Hold down; However, it does not work with GUI systems. I am typing with GUI:
time = 1:10; Data1 = (1:10). * 2; Data2 = (1:10). * 3; Plot (handles.axes1, t, data1); Wait; Plot (handles.axes1, t, data2); Hold down; But this data does not work any notes that just writes the last plot will be appreciated. Thank you.
Solution:
Time = 1:10; Data1 = (1:10). * 2; Data2 = (1:10). * 3; Plot (handles.axes1, x, y); Grip (handles. X1) plot (handles. X1, x, z);
If this is the only thing you want to plot, then only the axes Use the plot function without the handle (they will have the same handle by default):
t = 1:10; Data1 = (1:10). * 2; Data2 = (1:10). * 3; Plot (t, data1); Wait; Plot (t, data2); Hold down;
Comments
Post a Comment