How can I set up unequal bin widths in a histogram?
20 ビュー (過去 30 日間)
古いコメントを表示
I need to generate a histogram with 3 buckets that are all values less than 1, all values between 1 and 8, and all values over 8 on the Y-axis.
Here is what I have so far:
CV = dlmread('F:\Thesis\ProcessedData\Isotope Data\Tritium\CentralValleyTritium.csv',',');
histogram(CV,3,"Normalization","probability","DisplayStyle","bar")
%xticks([])
yticks([0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1])
yticklabels(yticks*100)
title('Central Valley aquifer system');
ylabel('Frequency (%)');
xlabel('Tritium (T.U.)')
0 件のコメント
採用された回答
その他の回答 (1 件)
Image Analyst
2022 年 6 月 22 日
You can define the edges however you want, like
data = -5 + 15* rand(100)
edges = [-inf, 0, 0.3, 0.4, 0.99, 8, inf] % or whatever...
histObject = histogram(data, edges)
grid on;
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!