ggplot2
原作者 | Hadley Wickham, Winston Chang |
---|---|
当前版本 | 2.2.1(2016年12月30日 | )
源代码库 | |
编程语言 | R |
许可协议 | GPLv2 |
网站 | ggplot2 |
ggplot2 is a 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.[1][2] It is licensed under GNU GPL v2.[3]
Updates
On 2 March 2012, ggplot2 version 0.9.0 was released with numerous changes to internal organization, scale construction and layers.[4]
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 this significant milestone, the next version of ggplot2 will be 1.0.0".[5] On 21 December 2015, ggplot 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 on(原文如此) stats, geoms and positions, and provide them in other packages."[6]
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.[7] This abstraction comes at a cost, with ggplot2 being slower than lattice graphics.[8]
One potential limitation of base R graphics is the "pen-and-paper model" utilized to populate the plotting device.[9] Graphical output from the interpreter is added directly to the plotting device or window rather than separately for each distinct element of a plot.[10] In this respect it is similar to the lattice package, though Wickham argues ggplot2 inherits a more formal model of graphics from Wilkinson.[11] As such, it allows for a high degree of modularity; the same underlying data can be transformed by many different scales or layers.[12][13]
Plots may be created via the convenience function qplot()
where arguments and defaults are meant to be similar to base R's plot()
function.[14][15] More complex plotting capacity is available via ggplot()
which exposes the user to more explicit elements of the grammar.[16]
相关项目
参考文献
- ^ Wickham, Hadley. ggplot2: Elegant Graphics for Data Analysis. Journal of Statistical Software. July 2010, 35 (1).
- ^ Wilkinson, Leland. ggplot2: Elegant Graphics for Data Analysis by WICKHAM, H. Biometrics. June 2011, 67 (2): 678–679. doi:10.1111/j.1541-0420.2011.01616.x.
- ^ https://cran.r-project.org/web/packages/ggplot2/index.html
- ^ ggplot2 Development Team. Changes and Additions to ggplot2-0.9.0 (PDF).
- ^ Wickham, Hadley. ggplot2 development. ggplot2 Google Group. [26 February 2014].
- ^ ggplot 2.0.0 http://blog.rstudio.org/2015/12/21/ggplot2-2-0-0/
- ^ Smith, David. Create beautiful statistical graphics with ggplot2. Revolutions. Revolution Analytics. [11 July 2011].
- ^ http://learnr.wordpress.com/2009/08/26/ggplot2-version-of-figures-in-lattice-multivariate-data-visualization-with-r-final-part/
- ^ Wickham, Hadley. ggplot2: Elegant Graphics for Data Analysis. Springer. 2009: 5. ISBN 978-0-387-98140-6.
- ^ Murrell, Paul. R Graphics. Wiley Interdisciplinary Reviews: Computational Statistics. August 2009, 1 (2): 216–220. doi:10.1002/wics.22.
- ^ Sarkar, Deepayan. Lattice: multivariate data visualization with R. Springer. 2008: xi. ISBN 978-0-387-75968-5.
- ^ Teetor, Paul. R Cookbook. O'Reilly. 2011: 223. ISBN 978-0-596-80915-7.
- ^ Wickham, Hadley. A Layered Grammar of Graphics. Journal of Computational and Graphical Statistics. March 2010, 19 (1): 3–28. doi:10.1198/jcgs.2009.07098.
- ^ R Development Core Team. R: A language and environment for statistical computing. Vienna, Austria: R Foundation for Statistical Computing. 2011. ISBN 3-900051-07-0.
- ^ Ginestet, Cedric. ggplot2: Elegant Graphics for Data Analysis. Journal of the Royal Statistical Society, Series A. January 2011, 174 (1): 245–246. doi:10.1111/j.1467-985X.2010.00676_9.x.
- ^ Muenchen, Robert A.; Hilbe, Joseph M. Graphics with ggplot2. R for STATA Users. Springer. ISBN 978-1-4419-1317-3. doi:10.1007/978-1-4419-1318-0_16.
- ^ ggplot for Python. yhat. [12 October 2014].
- ^ Interactive, online ggplot2 graphs. plotly. [12 October 2014].
- ^ ggplot for Matlab. gramm. [11 December 2015].
延伸阅读
- Wilkinson, Leland. The Grammar of Graphics. Springer. 2005. ISBN 978-0-387-98774-3.
- Wickham, Hadley. Engineering Data Analysis (with R and ggplot2). Google Tech Talks. 6 Jun 2011.