Key differences

  • Matplotlib has 3.3× as many GitHub stars as ggplot2 (23.5K vs 7K).
  • Matplotlib had more development activity over the last 12 months: 2,136 commits vs 72.
  • 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.5K
Commits, last 12 months
72 2.1K
Contributors
355 439
Forks
2.1K 8.6K
Show data as a table
ggplot2 vs Matplotlib by the numbers
Metricggplot2Matplotlib
GitHub stars7,02923,473
Commits, last 12 months722,136
Contributors355439
Forks2,1258,552

Development activity

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

  • ggplot2
  • Matplotlib
0100200300 Nov 2025 Dec Jan 2026 Feb Mar Apr May Jun Jul Aug Sep Octggplot2Matplotlib
0100200300 Nov 2025 Feb 2026 May Aug ggplot2Matplotlib
Show data as a table
ggplot2 vs Matplotlib: commits per month
Monthggplot2Matplotlib
Nov 20251272
Dec 20252097
Jan 20261153
Feb 20264144
Mar 20262244
Apr 20264197
May 20260257
Jun 20260260
Jul 20260202
Aug 20260142
Sep 202614179
Oct 202615189

Side by side

Attributeggplot2Matplotlib
DescriptionA plotting system based on the grammar of graphics.2D plotting library.
CategoryR data visualization packagesPython plotting libraries
LicenseMITPSF-2.0
LanguageRPython
StatusActiveActive
Latest releasev4.0.4 ()v3.11.2 ()
Last commit
Repository created
Open issues811,049
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.5K starsPythonPSF-2.0

More comparisons