售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
ggplot2 Essentials
Table of Contents
ggplot2 Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Graphics in R
Getting ggplot2 up and running
Packages in R
The Integrated Development Environment
RStudio
Eclipse and StatET
Emacs and ESS
The plotting environments in R
Standard graphics and grid-based graphics
Graphics and standard plots
Scatterplots with individual data points
Scatterplots with the line of one tree
Scatterplots with the line and points of one tree
Boxplots of the orange dataset
Boxplots with individual observations
Histograms of the orange dataset
Histograms with the reference line at the median value in red
Lattice and Trellis plots
Scatterplots with individual observations
Scatterplots of the orange dataset with faceting
Faceting scatterplots with line and points
Scatterplots with grouping data
Boxplots of the orange dataset
Histograms of the orange dataset
Histograms with the reference line at the median value in red
ggplot2 and the grammar of graphics
Further reading
Summary
2. Getting Started
General aspects
Introduction to aesthetic attributes
Introduction to faceting
Histograms and density plots
Bar charts
Boxplots
Scatterplots
Time series
Bubble charts and dot plots
Further reading
Summary
3. The Layers and Grammar of Graphics
Components of layered grammar
Creating a plot layer by layer with the ggplot function
Scales
The coordinate system
Faceting
Grid faceting
Wrap faceting
Layers in ggplot2
Data
Aesthetic mapping
Geometric
Stat
Position adjustment
Position adjustment of categorical data
Position adjustment of continuous data
Equivalent coding between qplot and ggplot
Histograms and density plots
Bar charts
Boxplots
Scatterplots
Further reading
Summary
4. Advanced Plotting Techniques
Adding statistics
Smooth lines
Linear regression
Statistics with faceting
Advanced aesthetic mapping
Typical aesthetic mappings available in ggplot2
Mapping the aesthetic to new stat variables
Difference in mapping continuous and categorical variables
Adding text and reference lines to plots
Add text and reference lines with facets
Plots with polar coordinates
A pie chart
A bullseye chart
A coxcomb diagram
Further reading
Summary
5. Controlling Plot Details
Exploring scales
The plot title and axis labels
Axis scales
The discrete axis
The continuous axis
Axis transformations
Legends
The legend title
Legend keys and key labels
Themes
Themes for the legend
Themes for the axis and title
Themes for the plot background
Themes with facets
Further reading
Summary
6. Plot Output
Multiple plots in one page
Arranging plots in rows and columns
Specifying the plot position
Saving plots to a file
Saving the plot manually
Saving the plot to a file without rendering it
Saving a single plot
Saving multiple plots on the same PDF file
Saving the plot after rendering it
Further reading
Summary
7. Special Applications of ggplot2
Plotting maps with ggplot2 and ggmap
Mapping representations with ggplot2 and maps
Representing maps with ggmap
Scatterplot matrix with GGally
Plotting heatmaps with ggplot2
Further reading
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜