plotly / plotly/plotly.js

render histograms on log axes with bin edge at 0

Open
#6,200 3 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

In this codepen, the first plot shows a basic histogram, although note that the leftmost bin edge is 0. The second plot just changes the x-axis type to log, which causes all the bars to disappear. The third plot shows that histograms on log axes can and do work, when there is not a bin edge at 0.

It would be nice if histograms reliably rendered on log axes, even with linearly computed bins like we have right now, because then folks could compute their own log bins and display plots. In some future iteration we could support automatic log bins, but let's just fix this one bug first? Would be good to make sure it's fixed for histogram2d etc as well if possible

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.

Research direction

Start by reproducing the three cases in the linked CodePen: a histogram with a zero bin edge, the same histogram on a log x-axis, and a working log-axis histogram without that edge. Trace the histogram rendering path and compare histogram2d if feasible; done means bars render reliably on log axes with the existing linear bins, including the relevant 2D case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
43/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.