Strange problem with old on and matlab GUI axes

1 view (last 30 days)
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?
  1 Comment
Image Analyst
Image Analyst on 17 Oct 2013
Edited: Image Analyst on 17 Oct 2013
Can you attach your code and data? Are any of your axes overlapping each other? There is a "guide" tag - are you using GUIDE? If so, what do you mean that you delete the axes ? Or did you mean you deleted a line plot within the axes?

Sign in to comment.

Accepted Answer

Gaven
Gaven on 18 Oct 2013
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

More Answers (0)

Categories

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

Tags

Community Treasure Hunt

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

Start Hunting!