violin-plot

How to get outline color instead of fill color in grouped violinplot

How to get outline color instead of fill color in grouped violinplot Question: I am using seaborn.violinplot() to derive the differences between two groups. Here is my code: import seaborn seaborn.set(style="whitegrid") tips = seaborn.load_dataset("tips") seaborn.violinplot(x="day", y="total_bill", hue="smoker", data=tips, palette="Set2", dodge=True) However, I don’t want the fill color in the violin, and would like to distinguish …

Total answers: 1

How to plot points over a violin plot?

How to plot points over a violin plot? Question: I have four pandas Series and I plot them using a violin plot as follows: import seaborn seaborn.violinplot([X1[‘total’], X2[‘total’], X3[‘total’], X4[‘total’]]) I would like to plot the values on top of the violin plot so I added: seaborn.stripplot([X1[‘total’], X2[‘total’], X3[‘total’], X4[‘total’]]) But this gives: It plots …

Total answers: 2

How to combine multiple data frames into a single violinplot and add a swarmplot

How to combine multiple data frames into a single violinplot and add a swarmplot Question: I have two data frames, with different shapes. I’d like to plot the two data frame values of the violin plots next to each other instead of overlapping. import pandas as pd import numpy as np import matplotlib.pyplot as plt …

Total answers: 2

how to sort values in plotly px.violin

how to sort values in plotly px.violin Question: guys! i am plotting some distributions across different states using px.violin and i want to order the stated based on distribution: right now you can see that florida with the biggest variance and higher values is in the middle, while i want it on the first left …

Total answers: 1

Why is the violin plot shape different for the same distribution?

Why is the violin plot shape different for the same distribution? Question: I am plotting three distributions of experiment results for comparing them side to side. However, one of the distributions (labeled MLP) is fixed (the same distribution in every plot), so I was expecting it to have the same shape accross different plots, assuming …

Total answers: 1

Showing both boxplots when using split in seaborn violinplots

Showing both boxplots when using split in seaborn violinplots Question: I would like to make split violin plots which also show the boxplots for both datasets, like in the figure of the question Seaborn: How to apply custom color to each seaborn violinplot? , problem is that when using split seaborn shows only one of …

Total answers: 1

split violinplot with different ranges

split violinplot with different ranges Question: I am trying to plot two variables with different ranges using split violinplots in seaborn. Here’s what I have done so far: from matplotlib import pyplot as plt import seaborn as sns import numpy as np df1 = pd.read_csv(‘dummy_metric1.csv’) df2 = pd.read_csv(‘dummy_metric2.csv’) fig, ax2 = plt.subplots() sns.set_style(‘white’) palette1 = …

Total answers: 1

violinplot not correctly scaling by count

violinplot not correctly scaling by count Question: I am trying to scale my violin plot by count, but the three final violins, which are based on three data points each, are vastly bigger than the first three, which are based on many more. My code is as follows: fig = plt.figure(figsize=(20,10)) grid = plt.GridSpec(1, 1, …

Total answers: 1

Violin plot: one violin, two halves by Boolean value

Violin plot: one violin, two halves by Boolean value Question: I am toying around with seaborn violinplot, trying to make a single "violin" with each half being a different distribution, to be easily compared. Modifying the simple example from here by changing the x axis to x=smoker I got to the following graph (linked below). …

Total answers: 1

Violin Plot troubles in Python on log scale

Violin Plot troubles in Python on log scale Question: My violin plots are showing weird formats when using a log scale on my plots. I’ve tried using matplotlib and seaborn and I get very similar results. import matplotlib.pyplot as plt import seaborn as sns data = [[1e-05, 0.00102, 0.00498, 0.09154, 0.02009, 1e-05, 0.06649, 0.42253, 0.02062, …

Total answers: 2