Newbie
Newbie

Reputation: 25

Plotting two different kind of plots next to each other (Seaborn, FacetGrid)

So I have been working on a dataset and have to plots which I would like to plot next to each other with Seaborn. Unfortunately, using the FacetGrid function I am only able to plot the same kind next to each other.

I hope you guys can help me solve my problem and thank you in advance

the first plot [the second plot[2]

Upvotes: 0

Views: 878

Answers (1)

Diziet Asahi
Diziet Asahi

Reputation: 40747

Don't use catplot() which is a figure-level function that creates a new FacetGrid each time, instead use the underlying axes-level functions barplot() and pointplot()

i.e.:

fig, (ax1, ax2) = plt.subplots(1,2)
sns.barplot(..., ax=ax1)
sns.pointplot(..., ax=ax2)

Upvotes: 1

Related Questions