Hi, I have a GUIDE with two plots, and when I press a button, I want to exchange the curves ploted between the two of them. I made a code that "works" but plots the graphs one above the other (like a hold on). This is the code, what can I do to fix this?
graph1=handles.axes2;axes_handle1 = findobj(graph1, 'Type', 'Axes');axes_children_handle1 = get(axes_handle1, 'Children');graph2=handles.axes3;axes_handle2 = findobj(graph2, 'Type', 'Axes');axes_children_handle2 = get(axes_handle2, 'Children');copyobj(axes_children_handle2, handles.axes2);copyobj(axes_children_handle1, handles.axes3);
Best Answer