MATLAB: Strange problem with old on and matlab GUI axes

guide

I have a gui which will plot Glucose levels in one axes, and insulin in another axes next to it. The user is supposed to plot the glucose values from multiple patients in the same axes object(i.e. multiple graphs in one axes object). However, as long as the insulin axes object is in the gui, I cannot plot more than 1 graph in the axes I am using to plot glucose levels. Without doing anything else, if I simply delete the axes I use to plot insulin values, I can now plot multiple glucose graphs on the same axes. Why can't I plot multiple graphs on one axes object when there is more than one axes object in the gui? I have tried using hold on, and hold all, but that does not work.
Any ideas?

Best Answer

Figured it out, I had to use set(handles.Axes_handle,'NextPlot','add') For some reason hold on did not work when more than one axes object was present in the GUI