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

4 次查看(过去 30 天)
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 个评论
Carsten
Carsten 2013-4-15
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.

请先登录,再进行评论。

回答(1 个)

Jan
Jan 2013-4-15
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.

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by