| caption2 = Base graphics
}}
'''ggplot2''' is an [[open-source]] [[data visualization]] [[R package|package]] for the [[Computational statistics|statistical programming]] language [[R (programming language)|R]]. Created by [[Hadley Wickham]] in 2005, ggplot2 is an implementation of [[Leland Wilkinson]]'s ''[[Wilkinson's Grammar of Graphics|''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.<ref>{{cite journal|last=Wickham|first=Hadley|title=ggplot2: Elegant Graphics for Data Analysis|journal=Journal of Statistical Software|date=July 2010|volume=35|issue=1|url=http://www.jstatsoft.org/v35/b01/paper}}</ref><ref>{{cite journal|last=Wilkinson|first=Leland|author-link=Leland Wilkinson|title=ggplot2: Elegant Graphics for Data Analysis by WICKHAM, H|journal=Biometrics|date=June 2011|volume=67|issue=2|pages=678–679|doi=10.1111/j.1541-0420.2011.01616.x}}</ref><ref>{{cite web|url=https://cran.r-project.org/web/packages/ggplot2/index.html|title=CRAN - Package ggplot2|date=12 October 2023 }}</ref>
== Updates ==
==Related projects==
See [[Wilkinson's Grammar of Graphics#Related projects|implementations of The Grammar of Graphics]].
* ggpy, ggplot for Python,<ref>{{cite web |title=yhat/ggpy: ggplot port for python |url=https://github.com/yhat/ggpy |access-date=2024-02-01 |website=[[GitHub]] |publisher=yhat}}</ref> but has not been updated since 20 November 2016
* plotnine<ref>{{cite web |url=https://plotnine.readthedocs.io/en/stable/about-plotnine.html |title=plotnine |access-date=2 August 2023 |archive-date=2 August 2023 |archive-url=https://web.archive.org/web/20230802015937/https://plotnine.readthedocs.io/en/stable/about-plotnine.html |url-status=dead }}</ref> started as an effort to improve the scalability of ggplot for [[Python (programming language)|Python]] and is largely compatible with ggplot2 syntax.
* Plotly - Interactive, online ggplot2 graphs<ref>{{cite web |title=Plotly graphing library for ggplot2 in ggplot2 |url=https://plot.ly/ggplot2/ |access-date=2024-02-01 |website=Plotly Graphing Libraries |publisher=[[Plotly]]}}</ref>
* gramm, a plotting class for [[MATLAB]] inspired by ggplot2<ref>{{cite web |title=ggplot for Matlab |url=https://github.com/piermorel/gramm |access-date=11 December 2015 |website=[[GitHub]] |publisher=Pierre Morel (@piermorel)}}</ref>
* gadfly, a system for plotting and visualization written in [[Julia (programming language)|Julia]], based largely on ggplot2<ref>{{cite web |title=Gadfly.jl |url=http://gadflyjl.org |access-date=11 September 2018 |website=Gadfly.jl}}</ref>
* Chart::GGPlot - ggplot2 port in [[Perl]]<ref>{{cite web |title=Stephan Loyd/Chart-GGPlot-0.0001 |url=https://metacpan.org/release/Chart-GGPlot |access-date=30 March 2019 |website=MetaCPAN}}</ref>, but has not been updated since 16 March 2023
* The Lets-Plot for Python library includes a native backend and a Python [[API]], which was mostly based on the ggplot2 package.<ref>{{cite web |title=JetBrains/lets-plot |url=https://github.com/JetBrains/lets-plot |access-date=3 April 2021 |website=[[GitHub]] |publisher=[[JetBrains]]}}</ref>
* Lets-Plot Kotlin API is an open-source plotting library for statistical data implemented using the [[Kotlin (programming language)|Kotlin programming language]], and is built on the principles of layered graphics first described in the Leland Wilkinson's work ''The Grammar of Graphics''.<ref>{{cite web |title=JetBrains/lets-plot-kotlin |url=https://github.com/JetBrains/lets-plot-kotlin |access-date=4 April 2021 |website=[[GitHub]] |publisher=[[JetBrains]]}}</ref>
* ggplotnim, plotting library using the [[Nim (programming language)|Nim]] programming language inspired by ggplot2.<ref>{{cite web |title=ggplotnim |url=https://github.com/Vindaar/ggplotnim |access-date=1 August 2023 |website=[[GitHub]] |publisher=Vindaar}}</ref>
* [[Vega and Vega-Lite visualisation grammars|Vega and Vega-Lite]] are plotting libraries that use JSON to specify plots.
== References ==
* {{cite book|last=Wilkinson|first=Leland|author-link=Leland Wilkinson|title=The Grammar of Graphics|year=2005|publisher=Springer|isbn=978-0-387-98774-3}}
* {{cite video |people= Wickham, Hadley|date= 6 June 2011|title=Engineering Data Analysis (with R and ggplot2) |url=https://www.youtube.com/watch?v=TaxJwC_MP9Q |publisher= Google Tech Talks}}
* {{cite book|last=Wickham|first=Hadley|title=ggplot2: Elegant Graphics for Data Analysis|url=https://ggplot2-book.org/|year=2016|publisher=[[Springer Science+Business Media]]|isbn=978-3319242750|edition=2nd}}
* {{cite book|last=Wickham|first=Hadley|title=R for Data Science|url=https://r4ds.had.co.nz/|year=2017|publisher=O'Reilly Media|isbn=978-1491910399}}
|