R Graphics – P. Murrel

2005 (1st Ed.)

Oldish, but must have book for basic plots and grid system.

Still a reference.

No ggplot here but only trad’ plots. You can skip it if ggplot is the only way for you.

Basic plots and the grid systems are presented in depth. If you want to build plots from scratch, controlling everything with a low level approach, building your own plotting functions, with no worries regarding future compatibility, then that’s your book. If you want quick (and dirty?) recipes, then it might not be the best choice.

An introduction to R is offered but I think this book is for intermediate users.

Please note that there are more recent editions. We talk here about the 1st Edition (2005).

Level

From

Rating: 2 out of 4.

To

Rating: 3 out of 4.

* Beginners | ** Fluent in R | *** Advanced Users | **** R Guru and other aliens

Interesting features

  • Good explanations of plots’ margins in base plots
  • Good coverage of multiple plots arrangement (layout())
  • Shows how to build custom legends in base plots
  • Introduction to Lattice plots
  • Advanced presentation of the Grid graphics’ system, to do more than graphs.

Cons

  • You guessed it : no ggplot
  • Nothing about colors
  • Nothing about stats
  • Too few material about mapping

Overall, I personally find it a bit oldish, but I still use it from time to time. Very comprehensive about grid graphics and good reference for margins in base plots.

Contents

1 An Introduction to R Graphics
1.1 R graphics examples
1.1.1 Standard plots
1.1.2 Trellis plots
1.1.3 Special-purpose plots
1.1.4 General graphical scenes
1.2 The organization of R graphics
1.2.1 Types of graphics functions
1.2.2 Traditional graphics versus grid graphics
1.3 Graphical output formats
1.3.1 Graphics devices
1.3.2 Multiple pages of output
1.3.3 Display lists

I TRADITIONAL GRAPHICS
2 Simple Usage of Traditional Graphics
2.1 The traditional graphics model
2.2 Plots of one or two variables
2.2.1 Arguments to graphics functions
2.2.2 Standard arguments
2.3 Plots of multiple variables
2.4 Modern plots and specialized plots
2.5 Interactive graphics

3 Customizing Traditional Graphics
3.1 The traditional graphics model in more detail
3.1.1 Plotting regions
3.1.2 The traditional graphics state
3.2 Controlling the appearance of plots
3.2.1 Colors
3.2.2 Lines

3.2.3 Text
3.2.4 Data symbols
3.2.5 Axes
3.2.6 Plotting regions
3.2.7 Clipping
3.2.8 Moving to a new plot
3.3 Arranging multiple plots
3.3.1 Using the traditional graphics state
3.3.2 Layouts
3.3.3 The split-screen approach
3.4 Annotating plots
3.4.1 Annotating the plot region
3.4.2 Missing values and non-finite values
3.4.3 Annotating the margins
3.4.4 Legends
3.4.5 Axes
3.4.6 Mathematical formulae
3.4.7 Coordinate systems
3.4.8 Bitmap images
3.4.9 Special cases
3.5 Creating new plots
3.5.1 A simple plot from scratch
3.5.2 A more complex plot from scratch
3.5.3 Writing traditional graphics functions

II GRID GRAPHICS
4 Trellis Graphics: the Lattice Package
4.1 The lattice graphics model
4.1.1 Lattice devices
4.2 Lattice plot types
4.2.1 The formula argument and multipanel conditioning
4.2.2 A nontrivial example
4.3 Controlling the appearance of lattice plots
4.4 Arranging lattice plots
4.5 Annotating lattice plots
4.5.1 Panel functions and strip functions
4.5.2 Adding output to a lattice plot
4.6 Creating new lattice plots

5 The Grid Graphics Model
5.1 A brief overview of grid graphics
5.1.1 A simple example
5.2 Graphical primitives

5.2.1 Standard arguments
5.3 Coordinate systems
5.3.1 Conversion functions
5.3.2 Complex units
5.4 Controlling the appearance of output
5.4.1 Specifying graphical parameter settings
5.4.2 Vectorized graphical parameter settings
5.5 Viewports
5.5.1 Pushing, popping, and navigating between viewports
5.5.2 Clipping to viewports
5.5.3 Viewport lists, stacks, and trees
5.5.4 Viewports as arguments to graphical primitives
5.5.5 Graphical parameter settings in viewports
5.5.6 Layouts
5.6 Missing values and non-finite values
5.7 Interactive graphics
5.8 Customizing lattice plots
5.8.1 Adding grid output to lattice output
5.8.2 Adding lattice output to grid output

6 The Grid Graphics Object Model
6.1 Working with graphical output
6.1.1 Standard functions and arguments
6.2 Grob lists, trees, and paths
6.2.1 Graphical parameter settings in gTrees
6.2.2 Viewports as components of gTrees
6.2.3 Searching for grobs
6.3 Working with graphical objects off-screen
6.3.1 Capturing output
6.4 Placing and packing grobs in frames
6.4.1 Placing and packing off-screen
6.5 Other details about grobs
6.5.1 Calculating the sizes of grobs
6.5.2 Editing graphical context
6.6 Saving and loading grid graphics
6.7 Working with lattice grobs

7 Developing New Graphics Functions and Objects
7.1 An example
7.1.1 Modularity
7.2 Simple graphics functions
7.2.1 Embedding graphical output
7.2.2 Facilitating annotation
7.2.3 Editing output
7.2.4 Absolute versus relative sizes

7.3 Graphical objects
7.3.1 Overview of creating a new graphical class
7.3.2 Defining a new graphical class
7.3.3 Validating grobs
7.3.4 Drawing grobs
7.3.5 Editing grobs
7.3.6 Sizing grobs
7.3.7 Pre-drawing and post-drawing
7.3.8 Completing the example
7.3.9 Reusing graphical elements
7.3.10 Other details
7.4 Querying grid

A A Brief Introduction to R
A.1 Obtaining and installing R
A.2 An environment for statistical computing and graphics
A.2.1 Batch processing
A.2.2 Data types
A.2.3 Variables
A.2.4 Indexing
A.2.5 Data structures
A.2.6 Formulae
A.2.7 Expressions
A.2.8 Packages
A.2.9 Accessing data sets
A.2.10 Getting help
A.3 A programming language
A.3.1 Debugging
A.4 An object-oriented language

B Combining Traditional Graphics and Grid Graphics
B.1 The gridBase package
B.1.1 Annotating base graphics using grid
B.1.2 Embedding base graphics plots in grid viewports
B.1.3 Problems and limitations

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: