by using (handles.axes) so need to hold on this axes, if using hold on only its not working it will work only with plot(x,y) not with plot(handles.axes,x,y) the code should be as follow:
- function pushbutton1_Callback(hObject, eventdata, handles)
x = [31 32 32 33 34 35 35 37 37]; % data 1
y = [0 3 11 29 53 80 98 126 150]; % maximum power
plot(handles.axes,x,y)
- function pushbutton2_Callback(hObject, eventdata, handles)
x = [31 32 32 33 34 35 35 37 37]; % data 1
y1=y*0.7; % actual power
hold(handles.axes,'on')
plot(handles.axes,x,y1)