how do i control the histograms generated by scatterhist?
7 ビュー (過去 30 日間)
古いコメントを表示
In scatterhist() output, I want standard bar histogram (vs. 'kernel','on' line plots). Need to control histogram color. The scatterhist() docs only describe how to control the scatter plot marker colors, but not the histograms. The 'FaceColor' parameter that normally controls histogram color is not recognized by scatterhist().
0 件のコメント
回答 (1 件)
Adam Danz
2018 年 10 月 4 日
The output to scatterhist() is a vector of handles to the scatter plot, the x histogram, and the y histogram axes, respectively. To change the face color of a bar plot, you just need to get the children of the histogram axis and then change the FaceColor. The example below changes the face color of the x axis histogram.
h = scatterhist(...);
h(2).Children(1).FaceColor = 'r'
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!