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

PX Input upgrades - wide form, constant, identity, auto-orientation etc #2336

Merged
merged 74 commits into from
May 25, 2020

Conversation

nicolaskruchten
Copy link
Contributor

@nicolaskruchten nicolaskruchten commented Mar 31, 2020

Closes #2333 - wide mode
Closes #2119 - constant and identity
Closes #2331 - auto-orientation
Closes #2332 - x XOR y behaviour
Closes #2005 - Pandas backend
Closes #1735 - multiple columns for x, y & Pandas backend

Also addresses previously-resolved issues in a better way:

Note: the scope of "wide mode" has been broadly expanded to include all cartesian-2d PX functions other than imshow, and to include selection of y=[col1, col2] and optional overriding of the perpendicular x value to be something other than the index as well. This seems like an odd fit for density_contour/density_heatmap until you think of them as a drop-in replacements for scatter to deal with overplotting ;)

Todo:

  • write medium post
  • write forum post
  • write readable docs
    • identity in the color section
    • pandas backend dedicated page
    • update px inputs page
    • remove "tidy" references everywhere

@nicolaskruchten nicolaskruchten changed the title initial cut at wide-form support PX Input upgrades - wide form, constant, identity, auto-orientation etc Apr 3, 2020
@emmanuelle
Copy link
Contributor

Thank you for an awesome PR. I'll give it another round of review with the docs and tests on wide format, but all this is going to be super useful and I think this integrates really well with the existing px code, in particular the "wide" part.

@nicolaskruchten
Copy link
Contributor Author

I think I will switch from value and variable to _value_ and _column_ to reduce collisions and make it clear these are “special” names.

@nicolaskruchten
Copy link
Contributor Author

Ask the last change I made stops something like symbol=“variable” from working so I will fix that too (during the variable to _column_ rename)

@nicolaskruchten
Copy link
Contributor Author

@emmanuelle LMK if it's OK to approve the Percy mock change... basically with this PR we automatically set histfunc to sum if both x and y are provided to histogram. This is less surprising/more automatic IMO.

doc/python/radar-chart.md Outdated Show resolved Hide resolved
doc/python/wide-form.md Outdated Show resolved Hide resolved
fig.show()
```

And of course, we can reassign `variable` to another argument as well, in this case we'll assign it to `x` and facet by the wide variable, and we'll switch to a [box plot](/python/box-plots/) for variety.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this sentence ("we can reassign variable to another argument as well, in this case we'll assign it to x").

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that sentence made no sense... fixed!

@nicolaskruchten nicolaskruchten marked this pull request as ready for review May 25, 2020 16:23
@emmanuelle
Copy link
Contributor

💃 for an epic PR!

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