How to refresh annotation after each frame?

I am trying to insert an output in an annotation outside of my plot. The value just keeps stacking on top of each other until it is unreadable. When I use the delete(findall(gcf,'Tag','stream') function it will delete the annotation and not refresh it like I am trying to do. Any suggestions?
annotation('textbox', [0 .6 .1 .2],'String','500 MHz Max Gain Slope (dB):','EdgeColor','none');
annotation('textbox', [0 .55 .1 .2],'String',Delta_band,'EdgeColor','none','Tag','stream')
delete(findall(gcf,'Tag','stream'));

 採用された回答

Image Analyst
Image Analyst 2018 年 10 月 11 日

0 投票

After you're done with each frame, call
drawnow;
to force immediate refresh/repainting of the screen.

2 件のコメント

Phillip Foy
Phillip Foy 2018 年 10 月 11 日
Thank you for a quick response! So do I even use the delete function with this? When I put drawnow; under my annotations I still end up with a movie that has the data stacked on top of each other.
Phillip Foy
Phillip Foy 2018 年 10 月 11 日
編集済み: Phillip Foy 2018 年 10 月 11 日
I was able to put the delete function before the annotations and then use the drawnow; function after the annotations and it worked perfectly! Thank you again for the help!!!
for ind = 1:a
delete(findall(gcf,'Tag','stream'));
annotation('textbox', [0 .6 .1 .2],'String','500 MHz Max Gain Slope (dB):','EdgeColor','none');
annotation('textbox', [0 .55 .1 .2],'String',Delta_band,'EdgeColor','none','Tag','stream')
drawnow;
end

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInteractive Control and Callbacks についてさらに検索

製品

タグ

質問済み:

2018 年 10 月 11 日

編集済み:

2019 年 8 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by