Hi all,
I've been scratching my head over this issue last few days and I can't seem to get a grasp of what's going on behind the scenes to make this occur.
Scenario: I am plotting three data vectors (y) against time (x) using "plot(handles.axes1,…." command which is preceeded by "set(1,'CurrentAxes,handles.axes1)". With this I'm able to successfully plot all three graphs, set xlim/ylim and other properties. If a callback executes "pause" the live plot still functions and there are no issues. However, if I try to then create an error dialog box, the plot switches to plotting inside the error dialog. If I generate the dialog box without a current pause being in effect, it plots as intended inside the GUI axes. There seems to be something that the function "pause" does to affect the plotting/drawing.
Is there a workaround I could do? I've tried getting rid of the "set(1,'CurrentAxes,handles.axes1)" before executing "plot(handles.axes1,…" but this results in only the first line being plotted and all subsequent properties to be ignored. It won't allow me to set xlim/ylim at all and the "hold on or all" function does not work. Even then, the error dialog becomes the "main axes" and everything is plotted there.
Any input is greatly appreciated! Thanks!
Best Answer