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

initial pass at PX auto-orientation #2335

Closed
wants to merge 5 commits into from
Closed

Conversation

nicolaskruchten
Copy link
Contributor

Closes #2331

Docs and tests still missing, but this is the approach I was going to take... verbose but seems to work OK.

@emmanuelle
Copy link
Contributor

thanks for the PR! I'm curious to know why many things need to be specified and why one could not just pass None to plotly.js for the orientation? More a philosophical question I will dig more into the code later but I wonder why px needs to know about orientation. Is it for marginals / subplots for example?

@nicolaskruchten
Copy link
Contributor Author

Hmm good question. Early on in the PX development work this didn't work so well but maybe things have changed since then. I will try!

@nicolaskruchten
Copy link
Contributor Author

OK so Plotly.js will do a good job at orientations by default, but in order for PX to do stuff like setting marginals and bins on the correct axis, we need to set this explicitly for histograms, and to do the overlay trick in this PR, we need to know the orientation at the PX level for box/violin. So... yeah I think that doing this work in PX makes sense even though it's partly duplicating what Plotly.js is doing.

The overlay thing for box/violin is to avoid gross spacing problems if you have the base axis mapped to the same variable as colors... we have to set the mode to overlay explicitly right now which is really annoying:

image

image

@nicolaskruchten
Copy link
Contributor Author

Superseded by #2336

@nicolaskruchten nicolaskruchten deleted the auto_orient branch June 19, 2020 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PX auto-detect orientation for box/violin/histogram
2 participants