seaborn

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

How to change colors of a variable in a kdeplot or scatterplot Question: 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 script: fig,ax=plt.subplots() kde = sns.kdeplot(data=HR25, x=’X’, …

Total answers: 1

How to define a colors with rgb values in the seaborn objects api?

How to define a colors with rgb values in the seaborn objects api? Question: I want to color my dots in a scatterplot with some rgb values. Using the original api, this is easy: import seaborn as sns x = [0, 1, 2] y = [0, 0, 0] colors = [[1, 0, 0], [0, 1, …

Total answers: 1

Plot horizontal bars using seaborn.objects interface (v0.12)

Plot horizontal bars using seaborn.objects interface (v0.12) Question: In the original API, barplot provided an orient parameter to swap bar orientation: import pandas as pd, numpy as np, seaborn as sns df = pd.DataFrame(data=np.random.randint(10, size=(3, 5)), columns=[*"abcde"]) # a b c d e # 0 8 6 5 2 3 # 1 0 0 0 …

Total answers: 1

How to combine a Gantt chart with scatter plot

How to combine a Gantt chart with scatter plot Question: I am trying to visualise a series of points on top of a Gantt chart. The result would look like this using sns.stripplot and plt.barh My issue is that so far I am only able to produce each figure separately and place them one over …

Total answers: 1

Adapt von Mises KDE to Seaborn

Adapt von Mises KDE to Seaborn Question: I am attempting to use Seaborn to plot a bivariate (joint) KDE on a polar projection. There is no support for this in Seaborn, and no direct support for an angular (von Mises) KDE in Scipy. scipy gaussian_kde and circular data solves a related but different case. Similarities …

Total answers: 2

How to create stacked bar chart with given dataframe shape?

How to create stacked bar chart with given dataframe shape? Question: I have a dataframe and would like to create a stacked bar chart by having date on the x-axis and quantity on the y-axis. This is the current dataframe: date | product_group | quantity 2021-10-01 | A | 10 2021-10-01 | C | 10 …

Total answers: 2

Melting data in pandas python

Melting data in pandas python Question: I have a data frame which have 11 columns. The data is in wide format. 1 column is unique ID. 5 columns represent Social Media apps, while 5 columns represent how much are these apps used (frequency). All the values are categorical. first 5 columns have 0 and 1 …

Total answers: 2

Seaborn boxplot – spaces beetween plots and categories

Seaborn boxplot – spaces beetween plots and categories Question: got problem with figure. I made seaborn boxplot for days and hours (1h stamp). I also get median value on boxes. My problem is that it is unreadable cause mediana text. I would like to change spaces beetween data sets for hours but cant find calling …

Total answers: 1

How to plot a matrix with description for each column and row?

How to plot a matrix with description for each column and row Question: I have a data set I need to augment. Therefore, I have implemented an augmentation method called magnitude warping that has two hyperparameters to tune, namely sigma and knots. To assess the quality, I have two models that I train using the …

Total answers: 1