アプリケーションデザイナーで、複数のグラフを全部消す方法を教えていただけないでしょうか?
Afficher commentaires plus anciens
アプリケーションデザイナーで、グラフを書く時、前に描画した複数のグラフを全部消して、新たに書き直したいのですが、
前に描画したグラフが消えてくれません。どこがまずいのか、ご教示いただければ幸いです。
(この例では毎回同じグラフになりますが、実際は毎回異なったグラフを書かせています。)
【app.Buttonを配置して、次のコールバックを作成】
app.UIAxes.NextPlot = 'replace';
hold(app.UIAxes,'on');
fimplicit(app.UIAxes,@(id,iq) id.^2+iq.^2 - 10,'BeingDeleted','on');
fimplicit(app.UIAxes,@(id,iq) id.^2+iq.^2 - 20,'BeingDeleted','on');
hold(app.UIAxes,'off');
Réponse acceptée
Plus de réponses (1)
Hiroshi Iwamura
le 12 Oct 2023
1 vote
hold(app.UIAxes,'on');
は
app.UIAxes.NextPlot ='add';
と同じです。
最初の fimplicit の後に hold on するか、cla してから書けば大丈夫ではないでしょうか
1 commentaire
高木 範明
le 16 Oct 2023
Catégories
En savoir plus sur App Designer を使用したアプリ開発 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!