How to differentiate range color on frequency counts plot
1 回表示 (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2020 年 3 月 27 日
回答済み: MathWorks Support Team
2020 年 3 月 27 日
I would like to use a different color only for a certain range color especially around the median range of frequency counts.
採用された回答
MathWorks Support Team
2020 年 3 月 27 日
Here is an example code to change the color to red for a certain range around the median of frequency counts.
x = [ 1 3.3 7 10 20 25 25 25 30 30 30 30 30 30 32 32 32 40 50 60];
mask = (22 < x) & (x < 33);
bin_edges = 1:1:60;
figure
histogram(x(~mask),bin_edges);
hold on
histogram(x(mask),bin_edges,'FaceColor','red');
hold off
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!