I am making a ridge plot using seaborn in python (following this example). In my case however, I have a lot more than 10 distributions, so I'd like to have multiple columns of histograms.
This all gets set up using this FacetGrid command:
g = sns.FacetGrid(df, row='date', aspect=15, height=.5)
Now, FacetGrid will wrap columns when you specify the col parameter, and then give col_wrap to be some value where any more plots will wrap around the the next row. What I would like to do instead is to specify the row parameter and have it wrap to a new column over say, 10 plots, but there doesn't seem to be a corresponding row_wrap parameter. Is there any way to work around this?
Short answer: No (as of seaborn 0.12.2).
But interestingly, FacetGrid() has the col_wrap keyword. When wrapped, it actually yields the same result:
g = sns.FacetGrid(df, row='date', aspect=15, height=.5,
col="variable", col_wrap=2)
g.map_dataframe(sns.lineplot, x="year", y="share") # just an example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With