What is the difference between bins counts in binscatter and histcounts2?

조회 수: 5 (최근 30일)
Sergii Snegir
Sergii Snegir 2021년 6월 25일
댓글: dpb 2021년 6월 25일
Dear communitty,
can any one explaine why bin counts obtained by binscatter and histcounts2 are slightly different?
This is my code:
y10=log10(y);
h0=binscatter(x,y10,250)
counts_2=get(h0,'Values');
[counts2,xbin,ybin] = histcounts2(x,y10,250);
The data is enclosed to this post.
I compared the max values of the matrixes and they have small difference
max(counts_2(:)) % binscatter
ans =
106
>> max(counts2(:)) % histcounts2
ans =
109
  댓글 수: 1
dpb
dpb 2021년 6월 25일
That file is empty as just noted in other thread...
As for the difference, I'd guess it's how the two deal with either missing or extreme values -- binscatter dives off into a MATLAB graphics primitive without prior calling histcounts2 explicitly in the top-level m-file code and I didn't delve any further.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by