Skip to content
Surf Wiki
Save to docs
general/cross-platform-free-software

From Surf Wiki (app.surf) — the open knowledge base

Ggplot2

Data visualization package for R


Data visualization package for R

FieldValue
nameggplot2
titleggplot2
logoGgplot2 hex logo.svg
screenshot
authorHadley Wickham, Winston Chang
released
latest release version
latest release date
latest preview date
programming languageR
language count
licenseMIT license
website

ggplot2 is an open-source data visualization package for the statistical programming language R. Created by Hadley Wickham in 2005, ggplot2 is an implementation of Leland Wilkinson's Grammar of Graphics—a general scheme for data visualization which breaks up graphs into semantic components such as scales and layers. ggplot2 can serve as a replacement for the base graphics in R and contains a number of defaults for web and print display of common scales. Since 2005, ggplot2 has grown in use to become one of the most popular R packages.

Updates

On 2 March 2012, ggplot2 version 0.9.0 was released with numerous changes to internal organization, scale construction and layers.

On 25 February 2014, Hadley Wickham formally announced that "ggplot2 is shifting to maintenance mode. This means that we are no longer adding new features, but we will continue to fix major bugs, and consider new features submitted as pull requests. In recognition [of] this significant milestone, the next version of ggplot2 will be 1.0.0".

On 21 December 2015, ggplot2 2.0.0 was released. In the announcement, it was stated that "ggplot2 now has an official extension mechanism. This means that others can now easily create their [own] stats, geoms and positions, and provide them in other packages."

On 5 July 2018, ggplot2 3.0.0 was released (initially planned as a ggplot2 2.3.0). This now provides support for tidy evaluation allowing quasiquotation in ggplot2 functions.

On 11 September 2025, ggplot2 4.0.0 was released. The accompanying blog post indicated that the release included "a rewrite of the object oriented system from S3 to S7, large new features to smaller quality of life improvements and bugfixes."

Comparison with base graphics and other packages

In contrast to base R graphics, ggplot2 allows the user to add, remove or alter components in a plot at a high level of abstraction. This abstraction comes at a cost, with ggplot2 being slower than lattice graphics.

Creating separate plots for various subsets of data in base R requires loops and manual management, whereas ggplot2 simplifies that process with a collection of "facet" functions to choose from.

One potential limitation of base R graphics is the "pen-and-paper model" utilized to populate the plotting device. Graphical output from the interpreter is added directly to the plotting device or window, rather than separately for each distinct element of a plot. In this respect it is similar to the lattice package, though Wickham argues ggplot2 inherits a more formal model of graphics from Wilkinson. As such, it allows for a high degree of modularity; the same underlying data can be transformed by many different scales or layers.

Plots may be created via the convenience function qplot() where arguments and defaults are meant to be similar to base R's plot() function. More complex plotting capacity is available via ggplot() which exposes the user to more explicit elements of the grammar.

Impact

After ten years of being developed, ggplot2 has continued to make an impact on the data visualization community: it has had over 10 million downloads, up to 400,000 downloads in a given month, and is used by data scientists from the US government to journalists at The New York Times to analyze and present data. Wickham posits the success of ggplot2 comes from the increased popularity of the R language and the relative ease of making aesthetically appealing graphics. Along with more serious uses of ggplot2, Wickham also supports the more unusual use cases, like exploring factors for winning in the reality TV show RuPaul's Drag Race.

References

References

  1. Wickham, Hadley. (July 2010). "ggplot2: Elegant Graphics for Data Analysis". Journal of Statistical Software.
  2. Wilkinson, Leland. (June 2011). "ggplot2: Elegant Graphics for Data Analysis by WICKHAM, H". Biometrics.
  3. (12 October 2023). "CRAN - Package ggplot2".
  4. ggplot2 Development Team. "Changes and Additions to ggplot2-0.9.0".
  5. Wickham, Hadley. "ggplot2 development". ggplot2 Google Group.
  6. (21 December 2015). "ggplot 2.0.0".
  7. "ggplot2 3.0.0".
  8. Wickham, Hadley. "19 Quasiquotation {{!}} Advanced R".
  9. (11 September 2025). "ggplot 4.0.0".
  10. Smith, David. "Create beautiful statistical graphics with ggplot2". [[Revolution Analytics]].
  11. (25 August 2009). "ggplot2 Version of Figures in "Lattice: Multivariate Data Visualization with R" (Final Part)".
  12. (22 March 2016). "Comparing ggplot2 and R Base Graphics".
  13. Wickham, Hadley. (2009). "ggplot2: Elegant Graphics for Data Analysis". Springer.
  14. Murrell, Paul. (August 2009). "R Graphics". Wiley Interdisciplinary Reviews: Computational Statistics.
  15. Sarkar, Deepayan. (2008). "Lattice: multivariate data visualization with R". Springer.
  16. Teetor, Paul. (2011). "R Cookbook". O'Reilly.
  17. Wickham, Hadley. (March 2010). "A Layered Grammar of Graphics". Journal of Computational and Graphical Statistics.
  18. R Development Core Team. (2011). "R: A language and environment for statistical computing". [[R Foundation for Statistical Computing]].
  19. Ginestet, Cedric. (January 2011). "ggplot2: Elegant Graphics for Data Analysis". Journal of the Royal Statistical Society, Series A.
  20. (2010). "R for Stata Users". Springer.
  21. Kopf, Dan. (2017-06-18). "All hail ggplot2—The code powering all those excellent charts is 10 years old".
Info: Wikipedia Source

This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.

Want to explore this topic further?

Ask Mako anything about Ggplot2 — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report