Skip to content

Error bars #1874

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

Closed
mbostock opened this issue Sep 24, 2023 · 0 comments · Fixed by #1892
Closed

Error bars #1874

mbostock opened this issue Sep 24, 2023 · 0 comments · Fixed by #1892
Labels
enhancement New feature or request

Comments

@mbostock
Copy link
Member

We should have an easier way to add error bars to a bar, as shown here using a rule and tick:

untitled (93)

Plot.plot({
  marks: [
    Plot.barX(alphabet, {x: "frequency", y: "letter", sort: {y: "-x"}, fill: "steelblue"}),
    Plot.ruleY(alphabet, {x1: (d) => d.frequency * 0.9, x2: (d) => d.frequency * 1.1, y: "letter"}),
    Plot.tickX(alphabet, {x: (d) => d.frequency * 0.9, inset: 6, y: "letter"}),
    Plot.tickX(alphabet, {x: (d) => d.frequency * 1.1, inset: 6, y: "letter"}),
    Plot.ruleX([0])
  ]
})

Ref. #1868 (comment)

@mbostock mbostock added the enhancement New feature or request label Sep 24, 2023
This was referenced Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant