mwaskom / seaborn

Statistical data visualization in Python
https://seaborn.pydata.org
BSD 3-Clause "New" or "Revised" License
12.18k stars 1.89k forks source link

UNITS of colorbar in 2D KDE plot? #3706

Closed ven1996 closed 1 month ago

ven1996 commented 1 month ago

Can someone please tell me what would be the unit of the colorbar on the 2D KDE plot? The document says that it is the normalized density. Normalized by what? And what would be the unit in that case.

mwaskom commented 1 month ago

Hi, see here for what a kernel density estimate shows: https://en.wikipedia.org/wiki/Kernel_density_estimation

ven1996 commented 1 month ago

Hi,

Thanks for your quick response.

My question was not regarding what KDE plot shows.

It was about what it shows on the color bar. Is it normalised by the bin width?

I am using KDE to plot stellar density (stars per degree^2). I need to plot the units of those values on the color bar also. The document says it's density not probability.

Can you please comment on this?

Thanks Vineet

On Mon, 3 Jun, 2024, 9:33 pm Michael Waskom, @.***> wrote:

Hi, see here for what a kernel density estimate shows: https://en.wikipedia.org/wiki/Kernel_density_estimation

— Reply to this email directly, view it on GitHub https://github.com/mwaskom/seaborn/issues/3706#issuecomment-2145590863, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASYAKCOZIX53IV5F3TG4EQDZFSHUFAVCNFSM6AAAAABIWS6KJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBVGU4TAOBWGM . You are receiving this because you authored the thread.Message ID: @.***>

mwaskom commented 1 month ago

The color bar in a 2d KDE plot is the same as the y axis in a 1d plot. There is no “binwidth” in a kde either. It sounds like you may be looking for a different kind of plot though.

ven1996 commented 1 month ago

Hi, Michael.

It was my misunderstanding.

Thanks for the clarification.

:::::::::::::::::::::::::::::::::::::::::::::::::::: Best Regards, Vineet

On Tue, 4 Jun 2024 at 00:49, Michael Waskom @.***> wrote:

The color bar in a 2d KDE plot is the same as the y axis in a 1d plot. There is no “binwidth” in a kde either. It sounds like you may be looking for a different kind of plot though.

— Reply to this email directly, view it on GitHub https://github.com/mwaskom/seaborn/issues/3706#issuecomment-2145946473, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASYAKCPW4KBPSA3O2CRGWXDZFS6VRAVCNFSM6AAAAABIWS6KJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBVHE2DMNBXGM . You are receiving this because you authored the thread.Message ID: @.***>