I want to plot two variables (x vs y) in already included GUIDE axes from two listboxes populated with different variables. x variable from listbox1 and y variable from listbox2.The listboxes are populated from loading .mat file from user (using uigetfile command). After selecting two variables x & y from listboxes pushbutton2 (plot) is pressed for plotting them on axes1.
I am getting following error in plotting these variables on axes1.
Error using plot
Invalid first data argument.
Error in ListBox>pushbutton2_Callback (line 161)
plot(x,y) Error in gui_mainfcn (line 95)
Error in ListBox (line 42)
Error while evaluating UIControl Callback
I am using following commands to plot on axes1:
[x,y] = get_var_names(handles); % this function returns two variables selected from listboxes.
I have plotted correctly in new figure with following command
But I want to plot on predefined axes1 in GUI.
I have searched on internet but still not getting solution. I am beginner in GUI building.
Comments required Plz...