Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide grid object for univariate distributions of columns in a dataframe #2487

Open
mwaskom opened this issue Feb 25, 2021 · 0 comments
Open

Comments

@mwaskom
Copy link
Owner

mwaskom commented Feb 25, 2021

i.e.

df = sns.load_dataset("penguins").select_dtypes(include=float)
f, axs = plt.subplots(1, df.shape[1], figsize=(df.shape[1] * 3, 3), constrained_layout=True)
for col, ax in zip(df, axs):
    sns.histplot(df[col], ax=ax)

image

A few options:

  • Make this a special case in displot with an internal melt (-.5)
  • Make this a special case in PairGrid with an option to make the x or y axis "derived" (-.5)
  • Create a new grid object (name??) that does this, along with a figure-level function (+.5)

It should probably support hue, col_wrap, and possibly support putting the data variable on y.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant