HIST 関数で描画したヒストグラムの色や透明度を変更するにはどうすればよいですか?
Show older comments
1つの座標軸上に複数のヒストグラムを重ね合わせて描画しようと思います。その際、それぞれのヒストグラムの色や、透明度を変更したいのですが、HIST 関数では、出力引数としてハンドルを得られないため、現在では、以下のように FINDOBJ 関数を使用しています。
Y1 = randn(1,100);
hist(Y1);
h = findobj(gca,'Type','patch');
set(h,'FaceAlpha',0.2,'FaceColor','r')
Accepted Answer
More Answers (0)
Categories
Find more on Histograms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!