Goal: I am trying to show individual data points in a figure with multiple grouped bar charts using Seaborn.
Problem: I tried to do it with a catplot for the bar chart and another catplot for the individual data points. However, this generates 2 figures: One figure with the bar chart and the other with the individual data points.
Question: Is there a way to show the individual data points in the same figure together with the bar chart using Seaborn?
This is my code generating 2 separate figures:
import seaborn as sns
tips = sns.load_dataset("tips")
g = sns.catplot(
x="sex",
y="total_bill",
hue="smoker",
row="time",
data=tips,
kind="bar",
ci = "sd",
edgecolor="black",
errcolor="black",
errwidth=1.5,
capsize = 0.1,
height=4,
aspect=.7,
)
g = sns.catplot(
x="sex",
y="total_bill",
hue="smoker",
row="time",
data=tips,
kind="strip",
height=4,
aspect=.7,
)
Output:
Question: Is there a way to show the individual data points in the same figure together with the bar chart using Seaborn?