Key differences

  • Matplotlib has 3.3× as many GitHub stars as ggplot2 (23.3K vs 7K).
  • Matplotlib had more development activity over the last 12 months: 2,023 commits vs 86.
  • ggplot2 is licensed under MIT; Matplotlib under PSF-2.0.
  • ggplot2 is written primarily in R, Matplotlib in Python.
  • ggplot2 is the older project: its repository was created in 2008, Matplotlib's in 2011.

By the numbers

  • ggplot2
  • Matplotlib
GitHub stars
7K 23.3K
Commits, last 12 months
86 2K
Contributors
354 438
Forks
2.1K 8.5K
Show data as a table
ggplot2 vs Matplotlib by the numbers
Metricggplot2Matplotlib
GitHub stars7,00523,323
Commits, last 12 months862,023
Contributors354438
Forks2,1258,503

Development activity

Commits per month to each default branch, last 12 complete months.

  • ggplot2
  • Matplotlib
0100200300 Oct 2025 Nov Dec Jan 2026 Feb Mar Apr May Jun Jul Aug Sepggplot2Matplotlib
0100200300 Oct 2025 Jan 2026 Apr Jul ggplot2Matplotlib
Show data as a table
ggplot2 vs Matplotlib: commits per month
Monthggplot2Matplotlib
Oct 202529100
Nov 20251272
Dec 20252097
Jan 20261153
Feb 20264144
Mar 20262244
Apr 20264197
May 20260257
Jun 20260257
Jul 20260199
Aug 20260139
Sep 202614164

Side by side

Attributeggplot2Matplotlib
DescriptionA plotting system based on the grammar of graphics.2D plotting library.
CategoryR data visualization packagesPython data visualization libraries
LicenseMITPSF-2.0
LanguageRPython
StatusActiveActive
Latest releasev4.0.3 ()v3.11.2 ()
Last commit
Repository created
Open issues761,059
Install
install.packages("ggplot2")
pip install matplotlib

Which should you choose?

Popularity and activity are only part of the story. Consider which ecosystem you work in, the chart types and interactions you need, how much data you render, and whether the license fits your project. Both tool pages list alternatives if neither is quite right.

  • ggplot2

    A plotting system based on the grammar of graphics.

    7K starsRMIT

  • Matplotlib

    2D plotting library.

    23.3K starsPythonPSF-2.0

More comparisons