フィルターのクリア

How to have an animated bar graph ?

18 ビュー (過去 30 日間)
Chafik Zerrouki
Chafik Zerrouki 2017 年 11 月 27 日
コメント済み: Chafik Zerrouki 2017 年 11 月 27 日
Hello,
I would like to have an animated bar graph. I already tried in App designer with the gauge but i can't change the appearance of it.
I would like to do it in App designer. If it's not possible, no problem.

採用された回答

KSSV
KSSV 2017 年 11 月 27 日
h = figure;
axis tight manual % this ensures that getframe() returns a consistent size
filename = 'test.gif';
for n = 1:0.5:5
% Draw plot for y = x.^n
x = rand(10,1) ;
bar(x)
drawnow
% Capture the plot as an image
frame = getframe(h);
im = frame2im(frame);
[imind,cm] = rgb2ind(im,256);
% Write to the GIF File
if n == 1
imwrite(imind,cm,filename,'gif', 'Loopcount',inf);
else
imwrite(imind,cm,filename,'gif','WriteMode','append');
end
end
  1 件のコメント
Chafik Zerrouki
Chafik Zerrouki 2017 年 11 月 27 日
Thank you !

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by