Create a colored scatter plot of two variables in R with three lines of code
Build layered charts by adding visual elements like points, lines, and bars on top of each other
Split a chart into small panels called facets to compare subgroups side by side in a single figure
Install with a single R command from CRAN, no external services or system dependencies required.
ggplot2 is an R package for making charts and graphs. It is one of the most widely used tools for data visualization in the R programming language, and it is installed by hundreds of thousands of people. The core idea is that you describe what you want to see by specifying your data and how different variables should map to visual properties like position, color, or size, and the library figures out how to draw it. The approach is built around layering: you start with a base call that sets the dataset and the axes, then you add layers for the actual marks (points, lines, bars, histograms), then optional layers for colors or scales, and then optional facets if you want to split the chart into small multiples. A short example in the README shows three lines of R code producing a colored scatter plot of car engine size versus fuel efficiency. Installation is a single command in R, either as part of the broader tidyverse collection of packages or on its own from CRAN, the standard R package repository. The project is mature and stable: the README notes it is 18 years old and changes slowly by design, with most new development happening in the ecosystem of extension packages rather than in ggplot2 itself. A gallery of community extensions is maintained separately. For learning, the README points to several resources: chapters in the free online book R for Data Science, an O'Reilly video course, a YouTube webinar, the R Graphics Cookbook for quick recipes, and a dedicated ggplot2 book for deeper understanding of the theory. Help is available through the Posit Community forums and Stack Overflow.
← tidyverse on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.