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

4 visualizzazioni (ultimi 30 giorni)
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 Commento
Carsten
Carsten il 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.

Accedi per commentare.

Risposte (1)

Jan
Jan il 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.

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by