how can I change the current axes in a GUI?
489 views (last 30 days)
Hi, how can I change the current axes in a GUI? I try to use the line function, but I don’t know how to activate the right axes for plotting in the wanted figure. I guess, there should be a simple solution, but I can’t find.
Paulo Silva on 2 Feb 2011
Here's one example:
axes(handles.axes2); %set the current axes to axes2
axes(h) makes existing axes h the current axes and brings the figure containing it into focus. It also makes h the first axes listed in the figure's Children property and sets the figure's CurrentAxes property to h. The current axes is the target for functions that draw image, line, patch, rectangle, surface, and text graphics objects.
More Answers (4)
Itziar Uzqueda on 23 Feb 2017
Hi! My problem is that when I try to plot an animatedline into axis1, instead of plotting there, another window is opened. also, when I try to use axes(handles.axes1) it says:
handle to deleted Axes
Mi code is here:
function Medir_Callback(hObject, eventdata, handles)
s = abrir_puerto();
I want it to be plotted in my Matlab GUI.