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

hexbin #740

Closed
wants to merge 8 commits into from
Closed

hexbin #740

wants to merge 8 commits into from

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Feb 8, 2022

demo: https://observablehq.com/@observablehq/plot-hexbin-740

  • ideally this will evolve to be a transform (or layout-transform), which would allow to pass the reducers cleanly, and to scale cleanly. Currently the legend will not display the correct value.
  • test all reducers, forbid those that don't work.
  • check what happens if x or y are missing
  • add a mesh (needs the clip: true option of v0.4.1)
  • documentation

@Fil Fil marked this pull request as ready for review February 8, 2022 15:25
Fil added 6 commits February 16, 2022 18:45
…ll channel; this solution creates a shared Y between facets (attached to the channels object).
cleaner API (Plot.hex is the shortcut, and Plot.hexbin the options transform)
(should work with the clip: true option in Plot 0.4.1)
@Fil
Copy link
Contributor Author

Fil commented Feb 18, 2022

Status: everything seems to work, I'm particularly happy with the color reducers (for example a hex can have a fill: min, stroke: max, title: "proportion-reduce").

However, I don't like the quantity of messy code I had to put in the layout logic to derive the new indices (in part because of the "one call per facet" logic), and deal with the new and updated/rescaled data, which sometimes wants to create new scales. There are several cases to consider (for example, when applying a fill: min reducer, we need to make sure that fill is not scaled before it's reduced), and I think there must be a simpler approach that I'm failing to see. (Also, by way of consequence, it's hard to merge this branch with main.)

I'll pause here for a moment.

@Fil Fil marked this pull request as draft February 23, 2022 14:03
@Fil Fil mentioned this pull request Feb 23, 2022
@mbostock
Copy link
Member

mbostock commented Mar 1, 2022

Superseded by #775.

@mbostock mbostock closed this Mar 1, 2022
@mbostock mbostock mentioned this pull request Mar 11, 2022
16 tasks
@Fil Fil deleted the fil/hexbin branch October 16, 2022 18:41
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.

2 participants