Skip to content

figure.autolayout rc param interferes with FacetGrid legend position #2496

@sorenwacker

Description

@sorenwacker

I am pretty happy about that new feature legend_out. However, I cannot reproduce the figures shown in the documentation.
Am I doing something wrong or is this feature available only in the development branch?

When I use this code from the documentation:

import seaborn as sns
sns.set_theme(style="ticks")
exercise = sns.load_dataset("exercise")
g = sns.catplot(x="time", y="pulse", hue="kind", data=exercise)

The legend shows up inside the graph. And passing legend_out=False or True looks identical.

import seaborn as sns
sns.set_theme(style="ticks")
exercise = sns.load_dataset("exercise")
g = sns.catplot(x="time", y="pulse", hue="kind", data=exercise, facet_kws={'legend_out': True})

And this creates a legend on the lefthandside with a box around:

import seaborn as sns
sns.set_theme(style="ticks")
exercise = sns.load_dataset("exercise")
g = sns.catplot(x="time", y="pulse", hue="kind", data=exercise, legend_out=False)

Did I forget something? Is there any other dependency like the matplotlib backend for example?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions