observablehq / observablehq/plot

Plot with inset, axis marks and two bands has wrong auto height

Open
#2,327 2 comments 0 reactions 1 assignee View on GitHub

@Fil is already working on this.

Since Jun 2, 2025.

bug
Dominant language
HTML
Stars
5.4k
Forks
244
PR merge metrics
No merged PRs in 30d

Description

If a plot specifies an inset as well as axis marks, then the resulting height causes y labels to overlap if the data only produces two bands:

Plot.plot({
  inset: 20,
  marks: [
    Plot.axisX({anchor: "top"}),
    Plot.axisX({anchor: "bottom"}),
    Plot.dot("AB", {y: d => d, x: 0})
  ]
})

Screenshot:

Image

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.