フィルターのクリア

How to save a histogram generated with imhist() function as a png image?

6 ビュー (過去 30 日間)
Sheikh Faishal Basher
Sheikh Faishal Basher 2018 年 5 月 30 日
編集済み: the cyclist 2018 年 5 月 31 日
when I save the image using imwrite() function it does not saves the axis only few spikes are saved. the code is given below.
=>> imwrite(imhist(temp),'F:\Histogram\h1.png');

回答 (1 件)

the cyclist
the cyclist 2018 年 5 月 30 日
編集済み: the cyclist 2018 年 5 月 30 日
You should be able to use the print command to save the figure to PNG.
  2 件のコメント
Sheikh Faishal Basher
Sheikh Faishal Basher 2018 年 5 月 31 日
this is not working. would you please write a sample code for this operation. I want to create a histogram in each irritation of the loop and save them with different name, (as Hist11, Hist12, hist21,hist22.....etc) the name will contain the row number and column number. Thank You.
imwrite(imhist(temp),'F:\499\Histogram\h1.png');
saveas(im1,sprintf('HIS%d.png',i));
the cyclist
the cyclist 2018 年 5 月 31 日
編集済み: the cyclist 2018 年 5 月 31 日
for nf=1:6
figure
histogram(randn(100,1))
filename = sprintf('histogram_file_%d',nf);
print('-dpng',filename)
end

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

カテゴリ

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

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by