plotnine is a mature Python library that implements the Grammar of Graphics, closely modeled after R's ggplot2. It provides a declarative, layered API for building statistical visualizations: users compose plots by adding geometric objects (geoms), statistical transformations (stats), scales, coordinate systems, facets, themes, and guides using the `+` operator. The library renders all output through matplotlib, supporting a wide range of plot types (scatter, bar, line, histogram, density, boxplot, violin, contour, maps, etc.) with extensive customization via themes and scales. It includes built-in example datasets, animation support, plot composition (arranging multiple plots), and integration with Jupyter/Quarto. The codebase is well-structured with a clear separation of concerns (geoms, stats, scales, coords, facets, themes, guides, composition) and employs several reusable design patterns such as a registry metaclass for automatic subclass registration, dataclass-based scale definitions, a hierarchical themeable system, and a docstring generation decorator. External dependencies include matplotlib, pandas, numpy, scipy, statsmodels, mizani, and contourpy, with optional support for adjustText, geopandas, and skmisc. The project is actively maintained with weekly CI tests against bleeding-edge dependencies and a comprehensive test suite using baseline image comparison.
ggprism is an R package that extends ggplot2 to replicate the visual aesthetics of GraphPad Prism. It provides themes, color/fill/shape palettes, and specialized geoms/guides to create publication-ready plots matching Prism's default styling. Key functionalities include applying Prism-like themes via `theme_prism()`, using discrete palettes with `scale_*_prism()` functions, adding statistical annotations (e.g., p-value brackets) with `add_pvalue()` and `geom_bracket()`, and customizing axes with specialized guides like `guide_prism_offset()` for offset ticks. The package follows ggplot2 extension conventions, using ggproto for custom geoms, discrete_scale for scales, and guide objects for axis modifications. It includes built-in datasets (e.g., wing morphology data) and relies on standard R datasets in examples. External dependencies center on ggplot2, scales, and rlang, with optional packages like ggnewscale and patchwork used in vignettes.