# Grammar of graphics libraries

> Declarative charts built from data, marks, scales and encodings. 22 tools, ranked by GitHub stars.

Libraries built on the grammar of graphics, Leland Wilkinson's model of charts as data mapped to marks through scales and encodings. Instead of picking a chart type, you declare how fields map to position, color and size, which makes new chart forms easy to compose.

| # | Tool | GitHub stars | Commits (12 mo) | License | Description |
|---:|---|---:|---:|---|---|
| 1 | [G2](https://awesomedataviz.com/tools/g2/) | 12,631 | 88 | MIT | An interactive and responsive charting library based on the grammar of graphics, maintained by Alibaba. |
| 2 | [Vega](https://awesomedataviz.com/tools/vega/) | 12,008 | 148 | BSD-3-Clause | Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs. |
| 3 | [Vega-Altair](https://awesomedataviz.com/tools/altair/) | 10,491 | 153 | BSD-3-Clause | Declarative statistical visualizations, based on Vega-Lite. |
| 4 | [ggplot2](https://awesomedataviz.com/tools/ggplot2/) | 7,005 | 86 | MIT | A plotting system based on the grammar of graphics. |
| 5 | [BizCharts](https://awesomedataviz.com/tools/bizcharts/) | 6,189 | 0 | MIT | Data visualization library based on G2 and React. |
| 6 | [Vega-Lite](https://awesomedataviz.com/tools/vega-lite/) | 5,502 | 120 | BSD-3-Clause | Is a high-level grammar of interactive graphics. It provides a concise JSON syntax for rapidly generating visualizations to support analysis. |
| 7 | [Observable Plot](https://awesomedataviz.com/tools/observable-plot/) | 5,400 | 38 | ISC | A JavaScript library for exploratory data visualization. |
| 8 | [plotnine](https://awesomedataviz.com/tools/plotnine/) | 4,770 | 490 | MIT | Grammar of graphics for Python, based on R's ggplot2. |
| 9 | [ggpy](https://awesomedataviz.com/tools/ggpy/) | 3,688 | 0 | BSD-2-Clause | Plotting system based on R's ggplot2. |
| 10 | [patchwork](https://awesomedataviz.com/tools/patchwork/) | 2,615 | 0 | MIT | Composes multiple ggplot2 plots into a single figure. |
| 11 | [ggstatsplot](https://awesomedataviz.com/tools/ggstatsplot/) | 2,207 | 84 | MIT | Ggplot2-based plots with statistical test details included in the graphic. |
| 12 | [rayshader](https://awesomedataviz.com/tools/rayshader/) | 2,182 | 33 | GPL-3.0 | 2D and 3D mapping and data visualization in R, including 3D renders of ggplot2 plots. |
| 13 | [gganimate](https://awesomedataviz.com/tools/gganimate/) | 1,983 | 0 | MIT | Grammar of animated graphics that extends ggplot2. |
| 14 | [Gadfly.jl](https://awesomedataviz.com/tools/gadfly-jl/) | 1,927 | 0 | Other | Statistical graphics for Julia based on the grammar of graphics. |
| 15 | [esquisse](https://awesomedataviz.com/tools/esquisse/) | 1,865 | 0 | GPL-3.0 | Drag-and-drop interface for building ggplot2 charts in RStudio or Shiny. |
| 16 | [Graphic](https://awesomedataviz.com/tools/graphic/) | 1,792 | 7 | MIT | Grammar of graphics data visualization and charting library for Flutter. |
| 17 | [Lets-Plot](https://awesomedataviz.com/tools/lets-plot/) | 1,783 | 606 | MIT | Grammar of graphics plotting library for Python and Kotlin, by JetBrains. |
| 18 | [ggrepel](https://awesomedataviz.com/tools/ggrepel/) | 1,261 | 30 | GPL-3.0 | Repels overlapping text labels away from each other in ggplot2 plots. |
| 19 | [ggraph](https://awesomedataviz.com/tools/ggraph/) | 1,118 | 0 | MIT | Grammar of graphics for graphs and networks, extending ggplot2. |
| 20 | [ggvis](https://awesomedataviz.com/tools/ggvis/) | 707 | 3 | GPL-2.0 | A data visualization package with a syntax similar to ggplot2 which allows you to create rich interactive graphics. |
| 21 | [Lets-Plot for Kotlin](https://awesomedataviz.com/tools/lets-plot-for-kotlin/) | 487 | 129 | MIT | Grammar of graphics plotting API for Kotlin, built on Lets-Plot. |
| 22 | [Glyph](https://awesomedataviz.com/tools/glyph/) | 3 | 258 | Apache-2.0 | Deterministic chart library that renders the same JSON spec to identical SVG on every platform, with DuckDB inside and an MCP server for AI agents. |

Source: https://awesomedataviz.com/topics/grammar-of-graphics/ · Data updated 2026-10-04 · Content: CC BY 4.0, Awesome Dataviz (https://awesomedataviz.com).
