How do I adjust the binwidth of histfit while keeping a fixed bin number

16 ビュー (過去 30 日間)
AAS
AAS 2020 年 2 月 17 日
コメント済み: fred ssemwogerere 2020 年 2 月 18 日
I would like to plot the histfit histogram touching each other while reducing the bin width,

回答 (1 件)

fred  ssemwogerere
fred ssemwogerere 2020 年 2 月 18 日
Hello, assuming you have a random plot for your data as:
bt=betarnd(4,8,100,1);
hnd=histfit(bt,8,'beta');
% The default bar width will be set as "1". change the bar width to have separate bars
hnd(1).BarWidth=0.6;
  2 件のコメント
AAS
AAS 2020 年 2 月 18 日
編集済み: AAS 2020 年 2 月 18 日
Thank you but I’m looking for a response where the bars are touching eachother. I can do this with the histogram function but I’m not able to change it with the histfit
So any reco for that will be greatly appreciated
fred  ssemwogerere
fred ssemwogerere 2020 年 2 月 18 日
Probably am not getting you well, but by default, "histfit" plots the bars in contact with each other at a bin width of 1.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by