Hello,
I have a GUI that takes values from a slider and makes plots using them. I'm using a listener to get all the plots for all the values along the way when the slider is dragged. It is working, however, I have a little problem.
function slider1_Callback(hObject, eventdata, handles)%unnecessary code here
D_son = evalin('base','D_son');axes(handles.axes1);plot(handles.axes1, D_son);xlim([1,360]) %LINE ONE
set(gca,'XTick',[1 45 90 135 180 225 270 315 360])%LINE TWO
addlistener(handles.slider1,'ContinuousValueChange',@(hObject, event) slider1_Callback(hObject, eventdata, handles));
My problem is, when I drag the slider;
1. It places the graph on the correct axes, however, it brings up a blank Figure page.
2. It completely ignores LINE ONE and LINE TWO I marked up there.
Other than these two, it works just fine. How can I fix these problems? Thank you in advance.
Regards
Best Answer