Questions tagged [kdeplot]

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

49 questions
0
votes
0 answers

How to get y-value from kdeplot

I am trying to draw a vertical line to a density plot from seaborn, and I want this line to reach the respective y-value at the curve. What I've tried: np.random.seed(1) a=np.random.normal(size=1000) sns.kdeplot(a) x, y =…
Oalvinegro
  • 458
  • 5
  • 21
0
votes
0 answers

How to make kdeplot robust to negative/zero values

I have two real/float variables stored in native python lists: x = [2.232, 2.331, 2.112...] y = [-3.431, 2.213, -1.232...] Notice that there are negative values. This seems to be giving the kde call some problems. I have gotten this…
Arash Howaida
  • 2,575
  • 2
  • 19
  • 50
0
votes
1 answer

How to change colors of a variable in a kdeplot or scatterplot

From this dataframe that represent the position of a fish according to different months: X Y Month 2040 2760 1 2041 2580 1 2045 2762 1 2047 2763 2 2053 2774 3 and through this seaborn…
toms
  • 103
  • 4
0
votes
0 answers

Why kdeplot is not normalized on its values?

When I am using seaborn's kdeplot function I am getting a plot where the y-axis is in its actual count. I want it to show a value between 0 to 1. The kernel density normally should be between 0 and 1. But why it is still giving its actual value,…
0
votes
0 answers

Embedding KDE plot on PyQt5 though Geoplot library

I want to embed Kernel Density Estimation plot on PyQt5 GUI using Geoplot library. I found out how to embed simple matplot through canvas and followed same steps for KDE plot but all in vain. GUI opens but doesn't embed KDE. When I close qt GUI, the…
B B
  • 1
  • 2
0
votes
1 answer

could not convert string to float with sns.kdeplot

I am trying to use sns.kdeplotto get a figure but I get the below error: ValueError: could not convert string to float: ' 0.43082 0.45386' Do you know how I can fix this error? Code snippet: data=pd.read_csv('input.txt', sep="\t", header =…
qasim
  • 427
  • 2
  • 5
  • 14
0
votes
0 answers

Seaborn kdeplot is not well fitted to my histogram

I'm using the kdeplot function of the seaborn package in python and I have a dataset called BH and the weight called MT of each value. Both variables are numpy arrays. import seaborn as sns import matplotlib.pyplot as plt BH =…
0
votes
1 answer

How to get the max x value of a seaborn distribution (and plot the corresponding line)?

I'm working on a project about my Spotify playlists, which output is 6 ditribution graphs with 3 lines each. Something like this: enter image description here I would like for every curve to plot a vertical line reaching the top of each curve, and…
Anto69
  • 3
  • 3
0
votes
1 answer

Normalizing height / mode of kdeplot to be 1

I am using the FacetGrid example from seaborn [Overlapping densities (‘ridge plot’)]. However, instead of normalizing the integral of the kdeplot, I want to normalize the heights. Does anyone have an idea, how to realize it? import numpy as…
0
votes
1 answer

How to fix seaborn kde error for geographic coordinates

I have the following dataframe (2000 rows) Latitude Longitude 31.400091 -109.782830 31.400091 -108.782830 31.410091 -108.782830 31.405091 -109.782830 31.400091 -110.77830 31.460091 -12.782830 ... ... I'm currently trying…
JEG
  • 154
  • 1
  • 15
0
votes
0 answers

Subtract two datasets to display the difference heatmap

How can I subtract two different kdeplots, so that the difference is displayed? Like in the picture on the top right, there is a green bubble which is overlapping the red one. Is it possible to subtract both datasets from each other and then display…
monkaCode
  • 33
  • 1
  • 4
0
votes
0 answers

Image and Kdeplot not matching

I'm trying to make a kdeplot graphic using some coordinates. Problem is that when I merge it with an image, the kdeplot rotates making it not to match the image. If I remove the line plt.imshow(img) The kdeplot shows the graphic correctly. fig, ax…
mew
  • 9
  • 2
0
votes
1 answer

Gradient color for kdeplot

I'm looking to plot a gradient of color that represents the density in seaborn 0.12.x Before it seems that the argument cmap was accepted : Add labels to Seaborn bivariate KDE plot It seems to not be the case in the 0.12.x…
Feitan
  • 84
  • 6
0
votes
2 answers

How to display the line color in the legend with kdeplot

I am wanting to overlay different 2D density plots over each other using the kdeplot() function from seaborn, however the color of the contours aren't appearing in the legend. How would I be able to update the legend with the color? Code…
Vecko
  • 21
  • 1
0
votes
1 answer

How to highlight kdeplot in average points?

I have a problem statement to draw graphs on 5 CSV files of algorithm and compare the better algorithm among them The csv file contains only floating point numbers of 100 rows * 4 columns I have plotted the kdeplot comparing the 1st column of 5 csv…