アプリケーションデザイナーで、複数のグラフを全部消す方法を教えていただけないでしょうか?
2 vues (au cours des 30 derniers jours)
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');
0 commentaires
Réponse acceptée
Plus de réponses (1)
Hiroshi Iwamura
le 12 Oct 2023
hold(app.UIAxes,'on');
は
app.UIAxes.NextPlot ='add';
と同じです。
最初の fimplicit の後に hold on するか、cla してから書けば大丈夫ではないでしょうか
Voir également
Catégories
En savoir plus sur App Designer を使用したアプリ開発 dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!