How to creat nonlinear bin histogram/bar plot with same Bar width?
古いコメントを表示
I am try to plot a histogram with uneven space bars in definition ( Logarithmic etc.), but I want all bar looks same width instead. Thanks for sharing the method to do it.
採用された回答
その他の回答 (1 件)
mirza
2016 年 12 月 26 日
You basically need to do 2 things:
1- Make the bin edges follow a logarithmic scale.
2- Set the x-axis to logarithmic scale.
y=100*rand(1000,1); % create random data
x=logspace(-1,2,20); % create bin edges with logarithmic scale
histogram(y,x); % create the plot
set(gca,'xscale','log'); % scale the x-axis

カテゴリ
ヘルプ センター および File Exchange で Data Distribution Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
