I am trying to do a Kernel Density Estimation (KDE) plot with seaborn and locate the median. The code looks something like this:
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
sns.set_palette("hls", 1)
data =…
Here is my effort to plot a pairgrid plot that use the kdeplot in the lower part with 2 hues:
My script is:
import seaborn as sns
g = sns.PairGrid(df2,hue='models')
g.map_upper(plt.scatter)
g.map_lower(sns.kdeplot)
g.map_diag(sns.distplot)
Is…
I was attempting to determine whether a feature is important or not base on its kde distribution for target variable. I am aware how to plot the kde plot and guess after looking at the plots, but is there a more formal doing this? Such as can we…
I have a distplot and I would like to plot a mean line that goes from 0 to the y value of the mean frequency. I want to do this, but have the line stop at when the distplot does. Why isn't there a simple parameter that does this? It would be very…
I'm trying to plot a colorbar next to my density plot with marginal axes.
It does plot the colorbar, but unfortunately not on the side.
That's what a tried so far:
sns.jointplot(x,y, data=df3, kind="kde", color="skyblue", legend=True, cbar=True,
…
I like the Seaborn example of multiple bivariate KDE plots, but I was hoping to use a standard matplotlib legend instead of the custom labels in that example.
Here's an example where I tried to use a legend:
import seaborn as sns
import…
Python version: 3.6.4 (Anaconda on Windows)
Seaborn: 0.8.1
Matplotlib: 2.1.2
I'm trying to create a 2D Kernel Density plot using Seaborn but I want each step in the colourmap to have a different alpha value. I had a look at this question to create a…
I am trying to make a nice free energy surface (heat map) using Seaborn's kdeplot.
I am very close but can not figure out a way to change the color bar scale. The color bar scale is important since it is supposed to represent the difference in…
How can each hue group of a seaborn.kdeplot, or seaborn.displot with kind='kde' be given a different linestyle?
Both axes-level and figure-level options will accept a str for linestyle/ls, which applies to all hue groups.
import seaborn as…
I want to create a Kernel-Density-Estimation with seaborn.kdeplot with a colorbar on the side.
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np; np.random.seed(10)
import seaborn as sns; sns.set(color_codes=True)
mean, cov =…
I would like to be able to extract the characteristic parameters from kernel density plots produced using Python's Seaborn. While there is a very nice example on obtaining the median of a distribution, I'd like to see whether this can be generalized…
I'm working with a dataset that only contains datetime objects and I have retrieved the day of the week and reformatted the time in a separate column like this (conversion functions included below):
datetime day_of_week time_of_day
0 …
I am looking for a way to color the intervals below the curve with different colors; on the interval x < 0, I would like to fill the area under the curve with one color and on the interval x >= 0 with another color, like the following image:
This…
Here's a picture of the plot I get for a bivariate density. However the numbers next to the colorbar are really not of much use here, and I would like either to delete them or replace by 'LOW' and 'HIGH'.
I didn't find any way of doing this so if…
I would like to shade the area under the kdeplot below the value -1.64.
I drew the kdeplot and a vertical line at -1.64.
How do I fill the triangular area between the kdeplot, the x-axis, and the vertical line?
Also, I would like the height of the…