This question already has answers here:
seaborn boxplot and stripplot points aren't aligned over the x-axis by hue
(1 answer)
Seaborn boxplot + stripplot: duplicate legend
(2 answers)
How to do a boxplot with individual data points using seaborn
(1 answer)
How to overlay data points on seaborn figure-level boxplots
(2 answers)
Closed 7 months ago.
I'm trying to make a box plot and a strip plot from the following dataframe, but I think I'm not putting the arguments or maybe the df should be re-arranged but I don't know how.
the dataframe is here
I'm hopping to have a strip plot and a box for each color (column) in the same plot.
I'd be grateful if you could help
Related
This question already has answers here:
Changing the gap between two adjacent values on the x-axis in Seaborn pointplot
(2 answers)
Seaborn pointplot x-axis distance between labels does not correspond to actual values
(1 answer)
How to set the range of x-axis for a seaborn pointplot?
(3 answers)
Closed last month.
I'm plotting a seaborn plot, for example:
sns.pointplot (x=[1,2,3,10], y=[2,3,4,5])
How can I make the X ticks to have spcaing that represents their values? 10 should be further apart but the spacing is equal.
ax.xaxis.set_ticks([1,2,3,10]) does not work
This question already has answers here:
Bar labels in matplotlib/Seaborn
(1 answer)
How to annotate a seaborn barplot with the aggregated value
(2 answers)
How to add multiple annotations to a bar plot
(1 answer)
Closed 5 months ago.
Image
The attached image shows the image of the seaborn plot. The values shown on the top of the graph are already rounded in the dataframe but the plot does not show the rounded values.
How can I do that?
Rounded with:
data["Marks (%)"] = data["Marks (%)"].apply(lambda x: round(x,1))
Seaborn code to showcase these values on top of the bar:
for i in ax.containers:
ax.bar_label(i, fontsize = 14)
This question already has answers here:
Avoiding repeated legend in seaborn boxplot overlaid by swarmplot
(1 answer)
Seaborn boxplot + stripplot: duplicate legend
(2 answers)
Closed 10 months ago.
Here is my diagrams,
I want to remove the labels of the second bar that is C1,C2,C3,C4,C5, because it is repeating.
This question already has answers here:
Wrapping long y labels in matplotlib tight layout using setp
(2 answers)
How to wrap xtick labels in matplotlib? [duplicate]
(1 answer)
split tick labels or wrap tick labels [duplicate]
(1 answer)
Closed 1 year ago.
I am plotting some variables but the data labels are a bit long so they are overlapping. I would like them to be displayed in multiple lines. The code I am using is this:
lista = list(df['col'].unique())
sns.countplot(data = df,x = 'col').set_xticklabels( lista,wrap=True)
sns.despine()
plt.show()
Seaborn plot
This question already has answers here:
How to change outliers to some other colors in a scatter plot
(2 answers)
Plot: color all larger than different color
(1 answer)
Scatter plot with same color for values below a threshold
(1 answer)
How to color scatterplot in matplotlib based on the values of y axis
(1 answer)
Closed 1 year ago.
So I want to plot a scatter plot with one dataset and have two different colors based on the condition that if a point is above a certain y-axis value, it is colored red (let's say) and below is colored differently.