I am using Seaborn to make boxplots from pandas dataframes. Seaborn
boxplots seem to essentially read the dataframes the same way as the pandas
boxplot
functionality (so I hope the solution is the same for both -- but I can just use the dataframe.boxplot
function as well). My dataframe has 12 columns and the following code generates a single plot with one boxplot for each column (just like the dataframe.boxplot()
function would).
fig, ax = plt.subplots()
sns.set_style("darkgrid", {"axes.facecolor":"darkgrey"})
pal = sns.color_palette("husl",12)
sns.boxplot(dataframe, color = pal)
Can anyone suggest a simple way of overlaying all the values (by columns) while making a boxplot from dataframes? I will appreciate any help with this.
This hasn't been added to the seaborn.boxplot
function yet, but there's something similar in the seaborn.violinplot
function, which has other advantages:
x = np.random.randn(30, 6)
sns.violinplot(x, inner="points")
sns.despine(trim=True)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With