HIST 関数で描画したヒストグラムの色や透明度を変更するにはどうすればよいですか?
Afficher commentaires plus anciens
1つの座標軸上に複数のヒストグラムを重ね合わせて描画しようと思います。その際、それぞれのヒストグラムの色や、透明度を変更したいのですが、HIST 関数では、出力引数としてハンドルを得られないため、現在では、以下のように FINDOBJ 関数を使用しています。
Y1 = randn(1,100);
hist(Y1);
h = findobj(gca,'Type','patch');
set(h,'FaceAlpha',0.2,'FaceColor','r')
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Histograms dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!