initial build-out of facet wrapping#1838
Conversation
nicolaskruchten
commented
Oct 21, 2019
- Closes Facet wrapping plotly_express#2
- Closes Passing data frame column to facet_col raises exception #1836
|
The Percy diffs are because this code generates |
|
Ah I found it: https://github.com/plotly/plotly.py/blob/master/packages/python/plotly/plotly/subplots.py#L529 Basically I'm now passing a length-0 element to OK so I'm fine with these Percy diffs. Ready for review! I guess I need some tests. |
|
It was not introduced by this PR, but the behaviour when there is a very large number of cols/rows is weird. For example or give errors like which is not very helpful as an error message. Should we either introduce a limit in the number of cols/rows, or try to catch this and output a better message? |
|
Thank you for fixing the bug of #1836. |
| ], | ||
| facet_col_wrap=[ | ||
| "int", | ||
| "Wrap the column variable at this width, so that the column facets span multiple rows.", |
There was a problem hiding this comment.
I would say "number of columns. Facets are wrapped at this number to span multiple rows". Maybe it's just me, but since I'm not familiar with this kind of representation I had a hard time understanding what this was before I actually tried it.
|
ok, I just left a doc suggestion which you might or might not implement. My comment about the large number of cols/rows is not specific to this PR and can go to an issue. 💃 |
81e1de4 to
be875be
Compare
|
Nice catch on the "many columns" thing, here's the issue I broke it off into: #1839 |
|
OK I've added percy tests for the two tricky cases of facet wrapping, and a test locking down the fix for #1836 |
|
The |