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.

By GitHub stars, the most popular grammar of graphics libraries here are G2 (12.6K stars), Vega (12K stars), and Vega-Altair (10.5K stars). 9 of 22 had commits in the last 90 days.

Grammar of graphics libraries, ranked by GitHub stars
1 G2

An interactive and responsive charting library based on the grammar of graphics, maintained by Alibaba.

JS charting 12.6K 88 MIT
2 Vega

Vega is a visualization grammar, a declarative format for creating, saving, and sharing interactive visualization designs.

More JavaScript 12K 148 BSD-3-Clause
3 Vega-Altair

Declarative statistical visualizations, based on Vega-Lite.

Python 10.5K 153 BSD-3-Clause
4 ggplot2

A plotting system based on the grammar of graphics.

R 7K 86 MIT
5 BizCharts Inactive

Data visualization library based on G2 and React.

React 6.2K 0 MIT
6 Vega-Lite

Is a high-level grammar of interactive graphics. It provides a concise JSON syntax for rapidly generating visualizations to support analysis.

More JavaScript 5.5K 120 BSD-3-Clause
7 Observable Plot

A JavaScript library for exploratory data visualization.

JS charting 5.4K 38 ISC
8 plotnine

Grammar of graphics for Python, based on R's ggplot2.

Python 4.8K 490 MIT
9 ggpy Archived

Plotting system based on R's ggplot2.

Python 3.7K 0 BSD-2-Clause
10 patchwork Inactive

Composes multiple ggplot2 plots into a single figure.

R 2.6K 0 MIT
11 ggstatsplot

Ggplot2-based plots with statistical test details included in the graphic.

R 2.2K 84 MIT
12 rayshader

2D and 3D mapping and data visualization in R, including 3D renders of ggplot2 plots.

R 2.2K 33 GPL-3.0
13 gganimate Inactive

Grammar of animated graphics that extends ggplot2.

R 2K 0 MIT
14 Gadfly.jl Inactive

Statistical graphics for Julia based on the grammar of graphics.

Julia 1.9K 0 Other
15 esquisse Inactive

Drag-and-drop interface for building ggplot2 charts in RStudio or Shiny.

R 1.9K 0 GPL-3.0
16 Graphic

Grammar of graphics data visualization and charting library for Flutter.

Flutter 1.8K 7 MIT
17 Lets-Plot

Grammar of graphics plotting library for Python and Kotlin, by JetBrains.

Python 1.8K 606 MIT
18 ggrepel

Repels overlapping text labels away from each other in ggplot2 plots.

R 1.3K 30 GPL-3.0
19 ggraph Inactive

Grammar of graphics for graphs and networks, extending ggplot2.

R 1.1K 0 MIT
20 ggvis Archived

A data visualization package with a syntax similar to ggplot2 which allows you to create rich interactive graphics.

R 707 3 GPL-2.0
21 Lets-Plot for Kotlin

Grammar of graphics plotting API for Kotlin, built on Lets-Plot.

JVM 487 129 MIT
22 Glyph

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.

JS charting 3 258 Apache-2.0

Head-to-head comparisons

Categories in this topic

Frequently asked questions

What is the most popular grammar of graphics library?

By GitHub stars, G2 is the most popular, with 12.6K stars, followed by Vega (12K) and Vega-Altair (10.5K).

Which grammar of graphics libraries are actively maintained?

14 of the 22 tools listed had commits in the last 12 months, including G2, Vega, Vega-Altair, ggplot2, and Vega-Lite. Each tool page shows monthly commit activity.

Are these grammar of graphics libraries free and open source?

21 of the 22 tools listed use an OSI-approved open-source license; the others are source-available, free to use, or use a custom license, so check each tool page. The most common license here is MIT.

Missing a tool? Add it with a one-line pull request to the README.