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

Auto: given bar, use cell over rect when no reducer #1674

Merged
merged 3 commits into from Jun 7, 2023

Conversation

tophtucker
Copy link
Contributor

If there's no reducer, the rects will have no extent, so we should treat numbers as ordinal. Fixes #1672. This lets us get to e.g. the Simpsons ratings heatmap:

image
Plot.auto(simpsons, {x: "season", y: "number_in_season", color: "imdb_rating", mark: "bar"}).plot()

This will never be chosen unless mark: "bar" is passed, because of isZeroReducer(xReduce) || isZeroReducer(yReduce) || colorReduce != null ? "bar" above.

@tophtucker tophtucker requested review from Fil and mbostock June 7, 2023 01:17
@mbostock mbostock enabled auto-merge (squash) June 7, 2023 01:25
@mbostock mbostock merged commit 98cb553 into main Jun 7, 2023
1 check passed
@mbostock mbostock deleted the toph/auto-simpsons branch June 7, 2023 01:27
Fil pushed a commit that referenced this pull request Aug 21, 2023
* given bar, use cell over rect when no reducer

* lint

* test output
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
* given bar, use cell over rect when no reducer

* lint

* test output
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.

Could Plot.auto make the Simpsons cell heatmap?
2 participants