How to enable the top and right spines of a FacetGrid
Asked Answered
E

1

1

I tried using sns.set_style("white"), but the spines only cover the bottom and left side. How can I set the spines all around the figure?

I also tried plt.subplots_adjust(right=0.1, top=0.1) to see if the spines were just hidden by the size, but I got a message that left and bottom needs to be bigger than right and top.

Elias answered 25/5, 2023 at 15:48 Comment(0)
R
1

The underlying FacetGrid automatically "despines" its figures, but you can disable this behavior using the facet_kws parameter:

import seaborn as sns
df = sns.load_dataset("titanic")
sns.catplot(data=df, x="age", y="class", facet_kws={"despine": False})

enter image description here

Rrhoea answered 26/5, 2023 at 10:55 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.