Add Box Plot and Heatmap rows to the comparison - #31
Merged
Conversation
Box plot shows hwy by class from mpg; heatmap shows diamonds counts by cut and clarity. seaborn.objects is skipped for both: 0.13 has no boxplot mark and no rect mark, and pandas has no heatmap.
ggplot2's geom_bin2d bins discrete positions with a continuous binwidth, so the R heatmap came out as tiny disconnected tiles. Counting first and drawing geom_tile is the idiomatic recipe and matches the pivot-then-draw approach the matplotlib, seaborn, and hvPlot columns already take. Also stop seaborn from rotating the clarity labels.
tdhopper
marked this pull request as ready for review
August 5, 2026 11:49
tdhopper
added a commit
that referenced
this pull request
Aug 5, 2026
Land the Box Plot and Heatmap rows stranded by the stacked merge of #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Two new plot rows — Box Plot (
hwybyclass, 9 of 10 columns) and Heatmap (diamondscut×claritycounts, 8 of 10) — bringing the site to 15 rows and 136 example cells. Gaps are API-honest: seaborn.objects has no boxplot or rect mark (verified against 0.13.2's mark list), and pandas.plothas no heatmap.Stacked on #30 (
content-refresh).Files to review (4):
Examples.ipynb(start here)render.pynamesdict (order controls page placement).tests/test_plots.pyINTRO.mdReviewer notes
geom_bin2d()is a trap on two discrete axes: it bins the integer factor positions with a continuous binwidth, yielding tiny disconnected tiles, and forcingbinwidth=c(1,1)misaligns tiles against tick labels by half a cell. The ggplot2/plotnine/lets-plot heatmaps use the R4DS idiom instead — count, thengeom_tile— which also mirrors the pivot-then-draw shape of the matplotlib/seaborn/hvPlot columns. Altair and plotly keep their built-in count aggregation, idiomatic there.Verified: notebook executes clean, 136/136 cells emit PNGs with zero error outputs, render + pytest pass, spot-checked ten of the new images.