observablehq / observablehq/plot

Elastic dodge?

Open
#1,543 2 comments 3 reactions 1 assignee View on GitHub

@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:

  1. "jitter" x with a (centered) random number of pixels
  2. "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
  3. "elastic": use mason then optimize with a force layout (probably not such a good idea, but could be fun to experiment with it)
  4. or just open it to a custom function, as we did with spatial interpolators

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.