0

Seaborn's FacetGrid has a margin_titles kwarg, and its effect is shown in the documentation e.g.

enter image description here

How do I similarly add margin titles when using Seaborn's relplot?

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
Rylan Schaeffer
  • 1,945
  • 2
  • 28
  • 50
  • Does this answer your question? [How to change the margin title color in a seaborn FacetGrid](https://stackoverflow.com/questions/67427241/how-to-change-the-margin-title-color-in-a-seaborn-facetgrid) – Trenton McKinney Mar 26 '22 at 21:29

1 Answers1

3

I am not sure how you want to use it, but this can be given in a dict in the facet_kws argument.

import seaborn as sns
tips = sns.load_dataset("tips")

sns.relplot(
    data=tips,
    x="total_bill",
    y="tip",
    hue="time",
    col="day",
    row="smoker",  
    facet_kws={"margin_titles": True}
)

enter image description here

bert wassink
  • 350
  • 3
  • 9