wiscoYogi
wiscoYogi

Reputation: 365

Seaborn displot facetgrid do not share y axis

I'm trying to make a grid of seaborn displots, using the built-in row/col arguments within the plotting function.

However, I have a high variance in the values for some of my rows and cols, and the default is to share an x/y axis.

I need to figure out where to put sharey = False and sharex = False. I can't pass them into sns.displot directly, and if I try and make a figure beforehand, it doesn't get incorporated into the displot object.

So in this example below, I need the second row to be scaled to have a maximum ~0.5, not 0.7 like the plot in (0,1), that's impacting the y axis scale of all the plots below.

Minimal reproducible example

tips = sns.load_dataset("tips")
plt.figure(figsize = (6, 6))
sns.displot(tips, x = "tip", multiple = "stack", kind = "kde", bw_adjust=.3, common_norm = False, col = "sex", row = "time")

Upvotes: 17

Views: 5508

Answers (1)

mwaskom
mwaskom

Reputation: 49032

Use facet_kws (e.g. facet_kws=dict(sharey=False))

Upvotes: 25

Related Questions