Problem with Plotting Multiple Graphs on One Handle in GUIDE

2 views (last 30 days)
Hello,
I am trying to plot multiple graphs on one handle (axes1) with a push of a Button. Below is the code that I tried (under pushbutton1_Callback).
I tried "hold on" before and it did not work too. It says there is an error "with uicontrol Callback"
Could it be that I am implementing the hold function wrongly?
k = [1 2 3 4 5];
l = [34 66 77 22 44];
j = [3 4 7 8];
i = [99 75 41];
plot(handles.axes1,k,l)
hold(handles.axes1,'on')
plot(handles.axes1,j,i)
Thank you so much in advance!
  1 Comment
Adam
Adam on 2 Mar 2015
Please give the whole error message. I'm sure it gives more information than the edited version you have given us.

Sign in to comment.

Answers (0)

Categories

Find more on Specifying Target for Graphics Output in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!