Docs: add plotnine tabsets, fix import collisions, standardize headings - #14
Merged
Conversation
Each example page now uses Quarto panel-tabsets to give plotnine and lets-plot equal treatment. Data transformation (tidydraws) cells remain outside the tabsets — only the ggplot rendering code is duplicated. Closes #12.
drbenvincent
force-pushed
the
issue-12-plotnine-docs
branch
from
July 4, 2026 18:32
c33bb8a to
288357e
Compare
- Replace bare from-plotnine/lets-plot imports with module-prefixed (import lets_plot as lp / import plotnine as p9) across all doc pages - Fix lets-plot tab code incorrectly using plotnine's ggplot - Remove unsupported bins param from plotnine's geom_density_2d - Add plotnine 2x2 grid composition to index.qmd (| and / operators) - Add installation tabset (uv / pip) to index.qmd - Add point_interval() to the function table in index.qmd - Split data transform from plotting code in index.qmd
- Rename ## Gallery → ## Plotting in 01, 02, 03 qmd files - Add ### Use tidydraws heading to showcase sections 3, 7, 8 - Split model creation from tidydraws extraction in showcase sections 3, 7, 8 - Remove redundant ### Plot heading in showcase section 5, merge data prep into ### Use tidydraws
drbenvincent
marked this pull request as ready for review
July 4, 2026 19:40
- Remove from tidydraws import point_interval in 01 and 03 - Replace all bare point_interval() calls with td.point_interval()
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.
Summary
Gives plotnine and lets-plot equal treatment across all example pages using Quarto panel-tabsets, fixes a critical bug where lets-plot tabs silently used plotnine's ggplot, and adds consistent heading structure to separate tidydraws data transformation from plotting.
Changes
Bug fix
from lets_plot import (...)followed byfrom plotnine import (...)in the same cell shadowedggplot,aes,labs,facet_wrap,theme_minimal,scale_color_gradientwith plotnine's versions. Lets-plot tabs were using plotnine'sggplotwith lets-plot geoms →LayerSpec.__radd__error. Fixed by switching to module-prefixed imports (import lets_plot as lp/import plotnine as p9) across all 4 doc pages.geom_density_2d(bins=...)— plotnine doesn't acceptbins; removed from plotnine tabs in showcase.qmd.New content
.panel-tabsetfor lets-plot + plotnine (plotnine uses|//composition for 2x2 grid), plus installation tabset (uv / pip), pluspoint_interval()in the function table.Heading standardization
## Gallery→## Plottingin 01, 02, 03 qmd files.### Use tidydrawssubheadings in showcase sections 3, 7, 8 (consistent with other sections).### Plotheading from showcase section 5.Design
Each plot has two tabs — lets-plot and plotnine — both rendering from the same tidy draws. Data transformation (tidydraws calls,
point_interval, etc.) runs once outside the tabsets under aUse tidydrawsheading, so the reader can see where tidydraws fits in the pipeline separate from plotting code.Closes #12