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
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
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!