Reputation: 3515
Following the example on the Seaborn API site and I can't seem to get the edgecolor to appear
Here's what I'm using
import seaborn as sns
sns.set_style("whitegrid")
tips = sns.load_dataset("tips")
ax = sns.boxplot(x="day", y="total_bill", data=tips)
ax = sns.stripplot(x="day", y="total_bill", data=tips, size=4, jitter=True, edgecolor="gray")
but this is the is what's being plotted. Am I missing something? I'm using Seaborn .6 and Matplotlib 1.4.3 with Python 3
Upvotes: 4
Views: 2728
Reputation: 62533
linewidth
greater than 0 must be added to seaborn.stripplot
, for the edgecolor (ec
) to show.
lw
will not result in an error, but the edgecolor will not display if lw
is used for linewidth
.python 3.8.11
, pandas 1.3.3
, matplotlib 3.4.3
, seaborn 0.11.2
import seaborn as sns
# load dataframe
tips = sns.load_dataset("tips")
ax = sns.boxplot(x="day", y="total_bill", data=tips)
# add stripplot with linewidth=1
sns.stripplot(x="day", y="total_bill", data=tips, size=4, jitter=True,
edgecolor="gray", ax=ax, linewidth=1)
Upvotes: 2