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

4 visualizaciones (últimos 30 días)
Sergii Snegir
Sergii Snegir el 25 de Jun. de 2021
Comentada: dpb el 25 de Jun. de 2021
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 comentario
dpb
dpb el 25 de Jun. de 2021
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Data Type Identification en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by