Boxplots: a case study in debugging and perseverance
summary
Bug: overlapping boxes when varwidth = TRUE caused group dodge to fail because collide groups by xmin and misses boxes with different xmin. Fix: implement a replacement placement/dodging algorithm that sees all boxes, compares start and end points to detect overlap, scales consistently for continuous and categorical x, and adds tests. Result fixes pull request #2196, generalizes to bars and rectangles, still fails for violins/dotplots and took about three weeks of work.
AI-written summary · about
chapters (5)
- 0:00Start
- 0:53When I try to produce boxplots with colours depending on a categorical variable, these appear overlapping if varwidth is set to TRUE
- 2:16How do I fix it? How do I know when I'm done?
- 11:45Doesn't work for continuous x axes
- 13:54Can we extend to bars? Arbitrary rectangles? Can we solve other open issues?
related talks
19mCracking open ggplot internals with {ggtrace}
17mHistory repeats itself: What the Du Bois Challenge taught me about reproducing design
47mUsing Julia & D3 to analyse web performance data
01h 01m50 ways to show your data
34mVisualising Multi Dimensional Data
38mBuilding a maintainable plotting library-PyData NYC
14mUnlock the Power of DataViz Animation and Interactivity in Quarto
28mThe bumps in the road: A retrospective on my data visualisation mistakes
