MATLAB Answers

Why does an axes tag name keep dissappearing when opening a saved figure in GUIDE?

9 views (last 30 days)
Paul
Paul on 12 Sep 2011
I've run into an issue that is becoming very very annoying and I'm wondering if anyone else ever experienced this.
I'm constructing a gui that has an axes with code in its creation function. For some reason, every now and then, when I close the open figure in GUIDE (after saving) and then re-open it, the tag name disappears, making the creation function code not work. I then have to open the figure in GUIDE again and reset the tag name.
Has anyone else encountered this very annoying issue? I have Matlab R2010a

  1 Comment

Carsten
Carsten on 15 Apr 2013
Yes it happens "every now and then" to me too! I have just made a Service Request regarding 'axes tags disappears after using GUIDE'.
MathWorks seem to be unaware of this problem, even if it has annoyed users for many years.

Sign in to comment.

Answers (1)

Jan
Jan on 15 Apr 2013
I'm convinced, that Matlab does not let the tag vanish magically, but that you observe the documented and intented feature, that high-level functions like plot() and imshow() clear existing objects in the axes, when the 'NextPlot' property is not 'add', e.g. as set by hold('on').
A solution is to set the axes' property 'NextPlot' to 'add', but then you have to delete formerly existing objects explicitly on demand. Another method would be to use low-level functions as line() or image() instead.

  0 Comments

Sign in to comment.


Translated by