Skip to main content
  • Book
  • © 2016

ggplot2

Elegant Graphics for Data Analysis

Authors:

  • Brings the book up-to-date with ggplot2 1.0, including major updates to the theme system
  • New scales, stats and geoms added throughout
  • Additional practice exercises
  • A revised introduction that focuses on ggplot() instead of qplot()
  • Updated chapters on data and modeling using tidyr, dplyr and broom

Part of the book series: Use R! (USE R)

Buy it now

Buying options

eBook USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 59.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

This is a preview of subscription content, log in via an institution to check for access.

Table of contents (12 chapters)

  1. Front Matter

    Pages i-xvi
  2. Getting Started

    1. Front Matter

      Pages 1-1
    2. Introduction

      • Hadley Wickham
      Pages 3-10
    3. Getting Started with ggplot2

      • Hadley Wickham
      Pages 11-31
    4. Toolbox

      • Hadley Wickham
      Pages 33-74
  3. The Grammar

    1. Front Matter

      Pages 75-75
    2. Mastering the Grammar

      • Hadley Wickham
      Pages 77-88
    3. Build a Plot Layer by Layer

      • Hadley Wickham
      Pages 89-107
    4. Scales, Axes and Legends

      • Hadley Wickham
      Pages 109-145
    5. Positioning

      • Hadley Wickham
      Pages 147-168
    6. Themes

      • Hadley Wickham
      Pages 169-186
  4. Data Analysis

    1. Front Matter

      Pages 187-187
    2. Data Analysis

      • Hadley Wickham
      Pages 189-201
    3. Data Transformation

      • Hadley Wickham
      Pages 203-220
    4. Modelling for Visualisation

      • Hadley Wickham
      Pages 221-240
    5. Programming with ggplot2

      • Hadley Wickham
      Pages 241-253
  5. Back Matter

    Pages 255-260

About this book

This new edition to the classic book by ggplot2 creator Hadley Wickham highlights compatibility with knitr and RStudio. ggplot2 is a data visualization package for R that helps users create data graphics, including those that are multi-layered, with ease. With ggplot2, it's easy to: 

  • produce handsome, publication-quality plots with automatic legends created from the plot specification
  • superimpose multiple layers (points, lines, maps, tiles, box plots) from different data sources with automatically adjusted common scales
  • add customizable smoothers that use powerful modeling capabilities of R, such as loess, linear models, generalized 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 a graph from a visual perspective, thinking about how eachcomponent of the data is represented on the final plot

This book will be useful to everyone who has struggled with displaying data in an informative and attractive way. Some basic knowledge of R is necessary (e.g., importing data into R).  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.

Reviews

“The versatility and efficiency of ggplot have led to the development of ggplot2 and this book which overviews the standard use and presentation secrets of functions developed in the last 5 years. … The book is written in an accessible manner and it is suitable for undergraduates, postgraduates and researchers with some R experience. All theoretical concepts are accompanied by code making it easy to learn by reproducing the examples.” (Irina Ioana Mohorianu, zbMATH 1397.62006, 2018)



“The book is an excellent and very comprehensive manual of … one of the most popular R packages. It is currently the only book describing ggplot2 in such depth. The book contains many examples and is very nicelyillustrated, demonstrating the strength of the package.” (Klaus Galensa, Computing Reviews, May, 2017)

Authors and Affiliations

  • RStudio, Houston, USA

    Hadley Wickham

About the author

Hadley Wickham is Chief Scientist at RStudio and Assistant Professor of Statistics at Rice University. Hadley 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 won the John Chambers Award for Statistical Computing for his work on the ggplot and reshape R packages.

Carson Sievert is a PhD student in the Department of Statistics at Iowa State University. His work includes R packages for acquiring data from the Web (pitchRx, bbscrapeR, XML2R), designing interactive Web graphics (animint, plotly), and visualizations for exploring statistical models (LDAvis). 

Bibliographic Information

Buy it now

Buying options

eBook USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 59.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access