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.

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
Hoskin
  • 11
  • 3

1 Answers1

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

mwaskom
  • 46,693
  • 16
  • 125
  • 127