Skip to main content
  • Book
  • © 2009

ggplot2

Elegant Graphics for Data Analysis

Authors:

  • Teaches how to create graphics in R using ggplot
  • Discusses the theoretical framework that underlies ggplot
  • Includes supplementary material: sn.pub/extras

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

Buy it now

Buying options

eBook USD 54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

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 (10 chapters)

  1. Front Matter

    Pages i-vii
  2. Introduction

    • Hadley Wickham
    Pages 1-7
  3. Getting started with qplot

    • Hadley Wickham
    Pages 9-26
  4. Mastering the grammar

    • Hadley Wickham
    Pages 27-40
  5. Build a plot layer by layer

    • Hadley Wickham
    Pages 41-64
  6. Toolbox

    • Hadley Wickham
    Pages 65-90
  7. Scales, axes and legends

    • Hadley Wickham
    Pages 91-113
  8. Positioning

    • Hadley Wickham
    Pages 115-137
  9. Polishing your plots for publication

    • Hadley Wickham
    Pages 139-155
  10. Manipulating data

    • Hadley Wickham
    Pages 157-175
  11. Reducing duplication

    • Hadley Wickham
    Pages 177-182
  12. Back Matter

    Pages 1-26

About this book

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.

Authors and Affiliations

  • Houston, U.S.A.

    Hadley Wickham

Bibliographic Information

Buy it now

Buying options

eBook USD 54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Other ways to access