Libraries where a chart is described as a mapping from data columns to visual channels such as position, color and size, rather than drawn step by step. plotnine and Lets-Plot follow the ggplot2 grammar of graphics, Vega-Altair builds on Vega-Lite, and HoloViews and hvPlot attach plotting to annotated data and dataframes.

By GitHub stars, the most popular Python declarative plotting libraries here are Vega-Altair (10.5K stars), plotnine (4.8K stars), and ggpy (3.7K stars). 4 of 6 had commits in the last 90 days.

Python grammar of graphics & declarative plotting libraries, ranked by GitHub stars
1 Vega-Altair

Declarative statistical visualizations, based on Vega-Lite.

10.5K 156 BSD-3-Clause
2 plotnine

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

4.8K 514 MIT
3 ggpy Archived

Plotting system based on R's ggplot2.

3.7K 0 BSD-2-Clause
4 HoloViews

Complex and declarative visualizations from annotated data.

2.9K 326 BSD-3-Clause
5 Lets-Plot

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

1.8K 511 MIT
6 hvPlot

High-level plotting API for pandas, xarray, Dask, NetworkX and other data structures, built on HoloViews.

1.4K 38 BSD-3-Clause

Head-to-head comparisons

Related topics

Related categories

Frequently asked questions

What is the most popular Python declarative plotting library?

By GitHub stars, Vega-Altair is the most popular, with 10.5K stars, followed by plotnine (4.8K) and ggpy (3.7K).

Which Python declarative plotting libraries are actively maintained?

5 of the 6 tools listed had commits in the last 12 months, including Vega-Altair, plotnine, HoloViews, Lets-Plot, and hvPlot. Each tool page shows monthly commit activity.

Are these Python declarative plotting libraries free and open source?

6 of the 6 tools listed use an OSI-approved open-source license. The most common license here is BSD-3-Clause.

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