← All open source projects

ggplot2

tidyverse/ggplot2

ggplot2 is an R library for declarative data visualization based on the Grammar of Graphics.

Forks 2,134
Author tidyverse
Language R
License NOASSERTION
Synced 2026-06-27

What It Is

ggplot2 is one of the key tidyverse libraries for data visualization in R. It implements the Grammar of Graphics approach.

Instead of drawing a chart manually, the user describes the data, maps variables to visual properties, and adds layers such as points, lines, or histograms. The library handles the plotting details.

What Is Inside

The ggplot2 model usually starts with `ggplot()`, then adds `aes()` and geometries such as `geom_point()` or `geom_histogram()`. Scales, facets, and coordinate systems can be added on top.

The layered model works well for analysis because a plot can be refined step by step instead of rewritten. That is valuable in statistics and research reporting.

How People Use It

Analysts, researchers, and data engineers use ggplot2 to inspect distributions, relationships, groups, and outliers. It is useful in both exploratory work and final reports.

A major strength is that the chart remains code. It can be rerun on new data, placed in reports, and checked when a source changes.

Example

The R syntax is shown as plain text because this catalog does not highlight R, but the example demonstrates ggplot2 layers.

Layered Plot

The example shows the main parts: data, variable mapping, and a point layer.

Language: Plain text
ggplot(mpg, aes(displ, hwy, colour = class)) +
  geom_point() +
  labs(title = "Fuel efficiency by engine size")

Strengths And Limits

ggplot2’s strength is its expressive model. Most everyday charts are described briefly while remaining extensible.

The limit appears when a project needs custom interactivity or highly specific infographics. ggplot2 can be the first step, but not always the final tool.

Project Context

ggplot2 is maintained in the tidyverse/ggplot2 repository; its public project history starts on 2008-05-25. GitHub reports the primary language as R, and the license as NOASSERTION. The project also has a dedicated site: https://ggplot2.tidyverse.org.

For a catalog page, this context matters because the reader sees a real project with an owner, license, technical base, and public change history rather than an abstract name.