Questions tagged [kdeplot]

These question are for seaborn.kdeplot. Also use the python and seaborn tags.

49 questions
2
votes
2 answers

How to get the full width at half maximum (FWHM) from kdeplot

I have used seaborn's kdeplot on some data. import seaborn as sns import numpy as np sns.kdeplot(np.random.rand(100)) Is it possible to return the fwhm from the curve created? And if not, is there another way to calculate it?
Chris U
  • 53
  • 6
2
votes
1 answer

How to change the colorbar ticklabels to percent

I have a problem with the colorbar of my kdeplot. It should show the percentage in each bin starting with 0%. I tried two different ways, but both visualizations are not exactly what I need. The version with JointGrid starts indeed with 0%, but…
Mel
  • 81
  • 2
  • 4
1
vote
1 answer

Use seaborn object interface to plot overlapping density plots, added inside a for loop, each having its own color/label shown in a legend

Using seaborn python library, I am trying to make several density plots overlapping each other in the same figure and I want to color/label each of the lines. Using seaborn objects interface I am able to make the density plots within a for loop. But…
rkmalaiya
  • 498
  • 1
  • 5
  • 15
1
vote
0 answers

How to not repeat sns.kdeplot computation when looping through multiple method?

I need to visualize a dataset distribution using several multiple method. Then I created a multiplehue_kdeplots function to generate three visual of the same dataset. It's working as expected, but as far as I can see on large dataset, the…
bchate
  • 145
  • 9
1
vote
1 answer

What is the meaning of "multiple" parameter in Seaborn's kdeplot?

I am trying to understand the meaning of multiple parameter in Seaborn's kdeplot. Below is taken from its documentation, multiple{{“layer”, “stack”, “fill”}} Method for drawing multiple elements when semantic mapping creates subsets. Only relevant…
Melike
  • 468
  • 1
  • 7
  • 15
1
vote
1 answer

How can I disable the gradient color with kdeplot?

When I run the below code, I get a figure with gradient color (from black to orange). Please look at the attached figure. Whereas I want to get a figure only with single color, orange (not figure with a gradient color). How can I do that? My…
qasim
  • 427
  • 2
  • 5
  • 14
1
vote
0 answers

Scaling issues using seaborn 2D kde plotting in jupyter notebooks in vscode

I am having an issue using any type of 2D kde plotting in seaborn. The y axis seems to be scaled very off. I am running this on vscode in a jupyter notebook using the most recent version of seaborn For example here's a joint plot I made using the…
dwilliams
  • 11
  • 2
1
vote
1 answer

kdeplot produces unexpected results

I created a simple seaborn kde plots and wonder whether this is a bug. My code is: import matplotlib.pyplot as plt import seaborn as sns import numpy as np sns.kdeplot(np.array([1,2]), cmap="Reds", shade=True, …
1
vote
1 answer

How to find last minima in density curve

i can't find easy way to get minima related to a density curve. With this kind of data : import matplotlib.pyplot as plt from scipy.misc import electrocardiogram from scipy.signal import find_peaks import seaborn as sns test = [7, 7, 7, 7, 8, 7,…
1
vote
2 answers

kdeplot set point mark

I'm trying to do something like this (Draw a point at the mean peak of a distplot or kdeplot in Seaborn). A'm need to mark point with value 13.72. but: list index out of range string: x = ax.lines[0].get_xdata() int_rate = df['int_rate'] ax =…
mraklbrw
  • 23
  • 3
1
vote
1 answer

Color the background in a kdeplot

I am using seaborn kernel density estimation to plot probability density contours like so: import numpy as np import seaborn as sns import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable x = np.random.normal(0, 3,…
Luismi98
  • 282
  • 3
  • 14
1
vote
1 answer

using scientific notation kdeplot

I'm trying to create a kde plot using seaborn in python but when setting the colorbar values to show in scientific notation I see no difference. See - making colorbar with scientific notation in seaborn for a heavily related topic. See -…
user8188120
  • 883
  • 1
  • 15
  • 30
1
vote
1 answer

How to add a colorbar to kdeplot and jointplot

When generating bivariate plots like hexbin, pandas generates a legend explaining frequency value for each color shade: pokemon.plot.hexbin(x='HP', y='Attack', gridsize=30) I cannot find a similar way to generate such a legend for jointplot and…
dzieciou
  • 4,049
  • 8
  • 41
  • 85
0
votes
0 answers

KDE plots of multiple features of grouped data

I made a poorly worded post with no reproducible example which, understandably, failed to get a proper answer. Now I am providing a minimal reproducible example - and I hope that this time I will get a better answer. I have a pandas dataframe which…
Nick
  • 2,924
  • 4
  • 36
  • 43
0
votes
0 answers

FacetGrid of contour plots with custom z-index information

Recently I attempted using seaborn to produce a contour plot. The only related function, kdeplot, seemingly only allows to visualize density of data, and it is not possible to provide custom z-index information. Let me illustrate on a toy example:…
Martin Benes
  • 265
  • 10