2009 (1st Ed.)
This book is about making plots with the ggplot2 library. It assumes some knowledge of R but does not target experienced users. It is now a bit outdated but still worth reading if you are a beginner with ggplot. The second version of the book is much better, so go for the second version if you have the option!
The book starts with the qplot() functions and then goes to the ggplot() function, with increasing tuning options. It covers a bit of data manipulation too.
I appreciated the fact that the logic behind the building of plots – so called “grammar of graphics”- is presented. This is something hard to get based only on internet resources. Though I think it doesn’t go deep enough. Experienced ggplot users will probably not find solutions to advanced plots issues.
Is also appreciated the fact that functions and options are summarized in tables, which make it easier to pick the ones you need. Though the tables are a bit hard to find when you look for a specific one.
I like the figures showing the names of the different components of the graph. Though, these figure are also hard to find for they are scattered all over the book.
I find it difficult to find a specific information I am looking for.
Please note that there are more recent editions. We talk here about the 1st Edition (2009).
* Beginners | ** Fluent in R | *** Advanced Users | **** R Guru and other aliens
- Good introduction to the “grammar of graphics”
- Good coverage of basic possibilities of ggplot2 (though incomplete)
- Tables summarizing in one place available functions or options
- Galleries of plots with different options of fine tuning
- R codes are rarely shown in totality and often hard to match with figures. Beginners can be easily lost.
- The first chapter on
qplot()is confusing, especially for beginners, as it is little related to
ggplot().(And seriously, who uses qplot?). Anyway it has been removed in the second version of the book.
- Annotations (text or geometric features) are barely covered.
- Printed in black and white
- Not so much things about colors
- Doesn’t explain how to get the parameters and confidence intervals of the models produced automatically with geom_smooth()
- The section on multiple plots is really too short. No way to do advanced multiplots based only on this book. Please note that multiple plots does not refers to facet or grid plots – which are well covered in the book – but to the arrangement of several plots on the same page
- Barely cover other packages based on ggplot2 (but it is true that at that time there were fewer than now)
- Almost nothing 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.
2 Getting started with qplot
3 Mastering the grammar
4 Build a plot layer by layer
6 Scales, axes and legends
8 Polishing your plots for publication
9 Manipulating data
10 Reducing duplication
A translating between different syntaxes
B Aesthetic specifications
C Manipulating plot rendering with grid