Add Lets-Plot column to the plotting comparison - #24
Merged
Conversation
Lets-Plot renders to PNG through ggsave; an IPython image/png formatter registered on PlotSpec keeps the example cells free of export boilerplate. It is imported as lp so its ggplot2-style names do not shadow plotnine's.
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
Lets-Plot (JetBrains' ggplot2 port) joins the comparison as a new column: 13 example cells, one per plot on the site, bringing the total to 79. Its ggplot2-faithful API slots in next to plotnine; three cells differ from the R reference only in facet syntax (Lets-Plot has no formula interface).
Files to review (7, +339 / -15):
Examples.ipynb(start here)package:lets-plot, plus setup-cell changes below.render.pylets-plotcolumn ordered after plotnine so the grammar-of-graphics libraries sit together.tests/test_plots.pylets-plotadded to all 13 plot entries.INTRO.md,CLAUDE.mdReviewer notes
image/pngforPlotSpecviaggsaveto a temp dir, so every barelp.ggplot(...)expression emits a PNG and the code shown on the site stays pure plotting code. Raster export is built into lets-plot 4.11+; no extra package.lp.-prefixed because the notebook doesfrom plotnine import *, which already ownsggplot/aes/geom_*. The bar-counts cell carries a site-visible note explaining this.geom_smoothgives the true 95% CI band and a smooth loess (plotnine's loess note doesn't apply), andxlimworks on the KDE plot (plotnine's doesn't). Facets usefacets=/x=/y=kwargs instead of R formulas.Verified end to end: notebook executes clean, 79/79 example cells emit PNGs, render.py succeeds, pytest passes.