Re: [問題] 如何控制histogram的bin width
figure
data = [0,2,9,2,5,8,7,3,1,9,4,3,5,8,10,0,1,2,9,5,10];
[nelements,centers] = hist(data);
H = bar(centers,nelements);
set(H, 'BarWidth', 0.4); % 改第三個輸入
※ 引述《sleeeve (赴美留學的日子...)》之銘言:
: figure
: data = [0,2,9,2,5,8,7,3,1,9,4,3,5,8,10,0,1,2,9,5,10];
: hist(data)
: 類似像這樣簡單的code,如何選擇想要的bin width呢?
: 譬如說我不想這麼寬,想窄一點的話?
: 如果改成 hist(data,0.5) 這樣圖跑不出來@@
: Thanks
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 172.250.128.199
推
10/10 15:03, , 1F
10/10 15:03, 1F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):