Hey there!
I set up a GUI using guide with an axis-object on it (along with many other objects, but they don't matter for this), let's call it ax . I then saved the handle to ax in a global variable:
global plotHandle;plotHandle = handles.ax;
What I try to do now is to plot something onto it from another script, for example by doing
global plotHandle;axis(plotHandle);plot(...);
But when I do so, Matlab opens a new window with the plot in it, rather than plotting it on ax on the GUI. Is there any way I can solve this? Or any other Idea how I could plot on the axis on the GUI from an external script?
Best Answer