This book describes ggplot2, a new data visualization package for R that uses the insights from Leland Wilkison's Grammar of Graphics to create a powerful and flexible system for creating data graphics. With ggplot2, it's easy to:

  • produce handsome, publication-quality plots, with automatic legends created from the plot specification
  • superpose multiple layers (points, lines, maps, tiles, box plots to name a few) from different data sources, with automatically adjusted common scales
  • add customisable smoothers that use the powerful modelling capabilities of R, such as loess, linear models, generalised additive models and robust regression
  • save any ggplot2 plot (or part thereof) for later modification or reuse
  • create custom themes that capture in-house or journal style requirements, and that can easily be applied to multiple plots
  • approach your graph from a visual perspective, thinking about how each component ofthe data is represented on the final plot

This book will be useful to everyone who has struggled with displaying their data in an informative and attractive way. You will need some basic knowledge of R (i.e. you should be able to get your data into R), but ggplot2 is a mini-language specifically tailored for producing graphics, and you'll learn everything you need in the book. After reading this book you'll be able to produce graphics customized precisely for your problems, and you'll find it easy to get graphics out of your head and on to the screen or page.

Hadley Wickham is an Assistant Professor of Statistics at Rice University, and is interested in developing computational and cognitive tools for making data preparation, visualization, and analysis easier. He has developed 15 R packages and in 2006 he won the John Chambers Award for Statistical Computing for his work on the ggplot and reshape R packages.



Zusammenfassung
1. 1 Welcome to ggplot2 ggplot2 is an R package for producing statistical, or data, graphics, but it is unlike most other graphics packages because it has a deep underlying grammar. This grammar, based on the Grammar of Graphics (Wilkinson, 2005), is composed of a set of independent components that can be composed in many di?erent ways. This makesggplot2 very powerful, because you are not limited to a set of pre-speci?ed graphics, but you can create new graphics that are precisely tailored for your problem. This may sound overwhelming, but because there is a simple set of core principles and very few special cases, ggplot2 is also easy to learn (although it may take a little time to forget your preconceptions from other graphics tools). Practically,ggplot2 provides beautiful, hassle-free plots, that take care of ?ddly details like drawing legends. The plots can be built up iteratively and edited later. A carefully chosen set of defaults means that most of the time you can produce a publication-quality graphic in seconds, but if you do have special formatting requirements, a comprehensive theming system makes it easy to do what you want. Instead of spending time making your graph look pretty, you can focus on creating a graph that best reveals the messages in your data.

Inhalt
Getting started with qplot.- Mastering the grammar.- Build a plot layer by layer.- Toolbox.- Scales, axes and legends.- Positioning.- Polishing your plots for publication.- Manipulating data.- Reducing duplication.
Titel
ggplot2
Untertitel
Elegant Graphics for Data Analysis
EAN
9780387981413
ISBN
978-0-387-98141-3
Format
E-Book (pdf)
Herausgeber
Veröffentlichung
03.10.2009
Digitaler Kopierschutz
Wasserzeichen
Dateigrösse
8.84 MB
Anzahl Seiten
213
Jahr
2009
Untertitel
Englisch