observablehq / observablehq/plot
Elastic dodge?
Open
@Fil is already working on this.
Since May 12, 2023.
enhancement
- Dominant language
- HTML
- Stars
- 5.4k
- Forks
- 244
- PR merge metrics
- No merged PRs in 30d
Description
As discussed in #1542 we could add an layout elasticity option (edited after Mike's comment below) in dodge, reflecting the uncertainty of the value. The base layout is unchanged, but it could be made more compact if the user was willing to trade off some precision in x for a better compactness.
Examples of algorithms that take uncertainty into account could be:
- "jitter" x with a (centered) random number of pixels
- "mason": at each step, test 5 different values "around" the true x and choose the optimal one, like a mason building up a brick wall
- "elastic": use mason then optimize with a force layout (probably not such a good idea, but could be fun to experiment with it)
- …
or just open it to a custom function, as we did with spatial interpolators
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.