Clear Filters
Clear Filters

アプリケーションデザ​イナーで、複数のグラ​フを全部消す方法を教​えていただけないでし​ょうか?

2 views (last 30 days)
高木 範明
高木 範明 on 12 Oct 2023
Commented: 高木 範明 on 16 Oct 2023
アプリケーションデザイナーで、グラフを書く時、前に描画した複数のグラフを全部消して、新たに書き直したいのですが、
前に描画したグラフが消えてくれません。どこがまずいのか、ご教示いただければ幸いです。
(この例では毎回同じグラフになりますが、実際は毎回異なったグラフを書かせています。)
【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');

Accepted Answer

高木 範明
高木 範明 on 12 Oct 2023
早々のご教示を、ありがとうございます。大変良くわかりました。

More Answers (1)

Hiroshi Iwamura
Hiroshi Iwamura on 12 Oct 2023
hold(app.UIAxes,'on');
app.UIAxes.NextPlot ='add';
と同じです。
最初の fimplicit の後に hold on するか、cla してから書けば大丈夫ではないでしょうか
  1 Comment
高木 範明
高木 範明 on 16 Oct 2023
早々のご教示を、ありがとうございます。大変良くわかりました。

Sign in to comment.

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!