Content deleted Content added
Erictleung (talk | contribs) →Related projects: Make more explicit the name of the package |
Erictleung (talk | contribs) m →Related projects: Added Wikilinks and some punctuation updates |
||
Line 54:
Creating a different plot for various subsets of the data requires for loops and manual management in base R graphics, whereas ggplot2 simplifies that process with a collection of "facet" functions to choose from.<ref>{{cite web |last1=Yau |first1=Nathan |title=Comparing ggplot2 and R Base Graphics |url=https://flowingdata.com/2016/03/22/comparing-ggplot2-and-r-base-graphics/ |website=FlowingData |access-date=17 April 2022 |language=en |date=22 March 2016}}</ref>
One potential limitation of base R graphics is the "pen-and-paper model" utilized to populate the plotting device.<ref>{{cite book|last=Wickham|first=Hadley|title=ggplot2: Elegant Graphics for Data Analysis |year=2009 |publisher=Springer |isbn=978-0-387-98140-6|pages=5}}</ref> Graphical output from the interpreter is added directly to the plotting device or window, rather than separately for each distinct element of a plot.<ref>{{cite journal |last=Murrell |first=Paul |title=R Graphics|journal=Wiley Interdisciplinary Reviews: Computational Statistics|date=August 2009|volume=1|issue=2|pages=216–220|doi=10.1002/wics.22|s2cid=37743308 }}</ref> In this respect it is similar to the lattice package, though Wickham argues ggplot2 inherits a more formal model of graphics from Wilkinson.<ref>{{cite book|last=Sarkar|first=Deepayan|title=Lattice: multivariate data visualization with R|year=2008|publisher=Springer|isbn=978-0-387-75968-5|pages=xi}}</ref> As such, it allows for a high degree of modularity; the same underlying data can be transformed by many different scales or layers.<ref>{{cite book|last=Teetor|first=Paul|title=R Cookbook|year=2011|publisher=O'Reilly|isbn=978-0-596-80915-7|pages=223}}</ref><ref>{{cite journal|last=Wickham|first=Hadley|date=March 2010|title=A Layered Grammar of Graphics|url=http://vita.had.co.nz/papers/layered-grammar.pdf|journal=Journal of Computational and Graphical Statistics|volume=19|issue=1|pages=3–28|doi=10.1198/jcgs.2009.07098|s2cid=58971746}}</ref>
Plots may be created via the convenience function <code>qplot()</code> where arguments and defaults are meant to be similar to base R's <code>plot()</code> function.<ref>{{cite book|title=R: A language and environment for statistical computing|year=2011|publisher=R Foundation for Statistical Computing|___location=Vienna, Austria|isbn=978-3-900051-07-5|url=http://www.R-project.org/|author=R Development Core Team}}</ref><ref>{{cite journal|last=Ginestet|first=Cedric|title=ggplot2: Elegant Graphics for Data Analysis |journal=Journal of the Royal Statistical Society, Series A |date=January 2011 |volume=174 |issue=1 |pages=245–246 |doi=10.1111/j.1467-985X.2010.00676_9.x}}</ref> More complex plotting capacity is available via <code>ggplot()</code> which exposes the user to more explicit elements of the grammar.<ref>{{cite book|last1=Muenchen|first1=Robert A.|last2=Hilbe|first2=Joseph M |title=R for Stata Users |publisher=Springer |isbn=978-1-4419-1317-3 |doi=10.1007/978-1-4419-1318-0_16 |chapter=Graphics with ggplot2|series=Statistics and Computing|year=2010|pages=385–452}}</ref>
Line 60:
==Related projects==
* 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 2016-11-20
* plotnine<ref>{{cite web |url=https://plotnine.readthedocs.io/en/stable/about-plotnine.html |title=plotnine |access-date=2 August 2023}}</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 |url=https://plot.ly/ggplot2/ |title=Interactive, online ggplot2 graphs |publisher=plotly |access-date=12 October 2014}}</ref>
* gramm, a plotting class for [[MATLAB]] inspired by ggplot2<ref>{{cite web|title=ggplot for Matlab|url=https://github.com/piermorel/gramm|publisher=gramm|access-date=11 December 2015}}</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}}</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}}</ref>
* The Lets-Plot for Python library includes a native backend and a Python [[API]], which was mostly based on the ggplot2 package well-known to data scientists who use R.<ref>{{cite web |url=https://github.com/JetBrains/lets-plot |title=JetBrains/lets-plot |publisher=JetBrains |access-date=3 April 2021}}</ref>
* Lets-Plot Kotlin API is an open-source plotting library for statistical data
* ggplotnim, plotting library using the [[Nim (programming language)|Nim]] programming language inspired by ggplot2.<ref>{{cite web |url=https://github.com/Vindaar/ggplotnim |title=ggplotnim |publisher=Vindaar |access-date=1 August 2023}}</ref>
|