Other eBook Options:

- Comprehensive coverage of the core graphical packages used in R
- New chapter on ggplot2
- New chapters on applications and extensions of R Graphics

Extensively updated to reflect the evolution of statistics and computing, the second edition of the bestselling **R Graphics** comes complete with new packages and new examples. Paul Murrell, widely known as the leading expert on R graphics, has developed an in-depth resource that helps both neophyte and seasoned users master the intricacies of R graphics.

**New in the Second Edition**

- Updated information on the core graphics engine, the traditional graphics system, the grid graphics system, and the lattice package
- A new chapter on the ggplot2 package
- New chapters on applications and extensions of R Graphics, including geographic maps, dynamic and interactive graphics, and node-and-edge graphs

Organized into five parts, **R Graphics** covers both "traditional" and newer, R-specific graphics systems. The book reviews the graphics facilities of the R language and describes R’s powerful grid graphics system. It then covers the graphics engine, which represents a common set of fundamental graphics facilities, and provides a series of brief overviews of the major areas of application for R graphics and the major extensions of R graphics.

**An Introduction to R Graphics**R graphics examples

The organization of R graphics

The plot() function

Plots of a single variable

Plots of two variables

Plots of many variables

Arguments to graphics functions

Specialized plots

Interactive graphics

Controlling the appearance of plots

Arranging multiple plots

Annotating plots

Creating new plots

Why another graphics system?

lattice plot types

The formula argument and multipanel conditioning

The group argument and legends

The layout argument and arranging plots

The scales argument and labelling axes

The panel argument and annotating plots

The par.settings argument and graphical parameters

Extending lattice plots

Quick plots

The ggplot2 graphics model

Why another graphics system?

Data

Geoms and aesthetics

Scales

Statistical transformations

The group aesthetic

Position adjustments

Coordinate transformations

Facets

Themes

Annotating

Extending ggplot2

A simple example

Graphical primitives

Coordinate systems

Controlling the appearance of output

Viewports

Missing values and non-finite values

Interactive graphics

Customizing lattice plots

Customizing ggplot2 output

Grob lists, trees, and paths

Working with graphical objects off-screen

7.Capturing output

Placing and packing grobs in frames

Other details about grobs

Saving and loading grid graphics

Working with lattice grobs

Working with ggplot2 grobs

Modularity

Simple graphics functions

Graphical objects

Debugging grid

Graphical output formats

Including R graphics in other documents

Device-specific features

Multiple pages of output

Display lists

Extension packages

Line styles

Data symbols

Fonts

Mathematical formulae

Drawing formatted text on a plot

Avoiding text overlaps

Peculiar primitives

Confidence bars

Calculations on colors

Custom coordinates

Atypical axes

Chernoff faces

Ternary plots

Soil texture diagrams

Polar plots

Hexagonal binning

XMM-Newton

Plots of Categorical Data

Categorical data on the y-axis

Visualizing contingency tables

Categorical plot matrices

Multipanel categorical plots

Customizing categorical plots

The vcdExtra package

Map annotation

Complex polygons

Map projections

Raster maps

Other packages

Graph layout and rendering

Other packages

Diagrams

The Canterbury earthquake

Traditional graphics

Lattice graphics

The scatterplot3d package

The rgl package

The vrmlgen package

Interactive Graphics

Graphics GUIs

Interactive graphics for the web

Importing raster graphics

Importing vector graphics

**Paul Murrell** attended Auckland University for his BSc (in Computer Science), BA (in Psychology), MSc (in Psychology), and PhD (in Statistics!). He then spent a year at the University of Cambridge in the Department of Community Medicine as a medical statistician and research assistant, before joining the Department of Statistics at Auckland University in October, 1999. His research interests include computational and graphical statistics. He is currently part of the development team for the R and Omegahat statistical computing projects. He was elected a Fellow of the American Statistical Association in 2010.

"The book under review is a greatly extended second edition of the well-received 2006 book. The size has almost doubled by adding 12 new chapters of which one is a former appendix, so that the second edition now contains 19 chapters divided into four parts. … this edition is invaluable and a necessity for everyone who regularly has to produce graphs by using R."

—Stefan K. Lhachimi, *Journal of the Royal Statistical Society, Series A*, February 2014

"This is a timely revision for a well-liked book. … this book is the place to go for advice on how to draw that graphic. … The strengths of the book remain the clear exposition of the traditional and grid graphics systems and the numerous examples (for which the code is, of course, available on the book’s website). The new coverage of many other graphics packages adds to the book’s attractiveness and in particular the chapter on *ggplot2 *is an excellent introduction to a complex package. … a very good book, which will be of use to anyone working seriously with graphics in R."

—Antony Unwin, *International Statistical Review*, 2012

"A lot has changed in the world of statistical graphics during this time, which is reflected in the substantial new material in the second edition. … the changes make this book the essential and comprehensive guide to graphics in R. … This is an excellent book. Everyone who uses R to draw graphics should have a copy!"

—*Journal of Statistical Software*, Vol. 43, September 2011

**Praise for the First Edition:**"

—Martin Maechler, Swiss Federal Institute of Technology, Zurich

"Starting with the basic plotting commands most users are familiar with from introductory texts, the book gives a comprehensive overview of the current state and design principles of visualizing data with R. Paul Murrell is one of the main authors of R’s graphical facilities, and inventor of completely new features like the grid system or expressions for annotation of plots with mathematical formulae. … beginners gradually are turned into programmers while learning the language, having ample material for both novices and experts. It will certainly claim its place on the bookshelf of reference guides next to my desktop."

—Friedrich Leisch, Technical University of Vienna, Austria

"**R Graphics** is exactly the sort of documentation that R needs. It is written clearly, with many examples, and will be useful for any level of R expertise from novice upwards. It contains more than a hundred figures containing model code and its output. There are extensive cross-references that make finding detailed information easy. My copy of the book is from the first printing, but it is exceptionally free of typographical and other errors. … Murrell is to be congratulated."

—Duncan Murdoch, University of Western Ontario, Canada

"Thanks to Paul Murrell’s new book, the secrets of both traditional graphics and the new, modern grid system get unveiled … a must-have for novices and professionals alike, the ultimate guide to the power (and beauty) of R graphics."

—David Meyer, Vienna University of Economics and Business Administration, *R News,* 6(2), 2006

"It achieves its goal of documenting the graphical facilities of R and should be extremely useful to anyone in need of detailed knowledge, in particular, of R’s grid graphics."

—Soren Feodor Nielsen, University of Copenhagen, *Journal of Applied Statistics*, November 2007, Vol. 34, No. 9