Data Visualization with ggplot2
Welcome
1
Introduction
2
Quick Tour
2.1
Introduction
2.2
Libraries, Code & Data
2.3
Scatter Plot
2.4
Bar Plot
2.5
Box Plot
2.6
Line Chart
2.7
Histogram
3
Geoms
3.1
Introduction
3.2
Libraries, Code & Data
3.2.1
Data
3.2.2
Data Dictionary
3.3
Point
3.4
Regression Line
3.5
Bar
3.5.1
Frequency
3.5.2
Weight
3.5.3
Stacked Bar Plot
3.5.4
Horizontal Bar Plot
3.6
Columns
3.7
Boxplot
3.8
Histogram
3.9
Line
3.9.1
Data
3.9.2
Horizontal Line
3.9.3
Vertical Line
3.10
Label
3.11
Text
4
Aesthetics
4.1
Introduction
4.2
Libraries, Code & Data
4.2.1
Data
4.2.2
Data Dictionary
4.3
Color
4.3.1
Point
4.4
Line Chart
4.4.1
Data
4.5
Bar Plots
4.6
Histograms
4.7
Box Plots
5
Labels
5.1
Introduction
5.2
Basic Plot
5.3
Title & Subtitle
5.3.1
ggtitle()
5.4
Axis Labels
5.5
Labs
5.6
Axis Range
5.6.1
X Axis
5.6.2
Y Axis
5.6.3
Expand Limits
5.6.4
Remove Axis Labels
5.7
Format Title & Axis Labels
5.7.1
Color
5.7.2
Font Family
5.7.3
Font Face
5.7.4
Font Size
5.8
Horizontal Alignment
5.9
Putting it all together…
5.9.1
Title
5.9.2
X axis label
5.9.3
Y axis label
6
Text Annotations
6.1
Introduction
6.2
Annotate
6.2.1
Add Text
6.2.2
Color
6.2.3
Size
6.2.4
Font
6.2.5
Angle
6.3
Putting it all together..
7
Scatter Plots
7.1
Introduction
7.2
Basic Plot
7.3
Jitter
7.4
Aesthetics
7.4.1
Specify Values
7.4.2
Map Variables
7.5
Regression Line
7.5.1
Intercept & Slope
7.5.2
Add Line
8
Line Graphs
8.1
Introduction
8.2
Case Study
8.2.1
Data
8.3
Line Chart
8.3.1
Line Color
8.3.2
Line Type
8.3.3
Line Size
8.4
Multiple Lines
8.4.1
Modify Data
9
Bar Plots
9.1
Introduction
9.2
Data
9.2.1
Data Dictionary
9.3
Basic Plot
9.4
Bar Color
9.5
Stacked Bar Plot
9.6
Grouped Bar Plot
9.7
Proportional Bar Plot
9.8
Horizontal Bar Plot
9.9
Bar Line
10
Box Plots
10.1
Introduction
10.2
Structure
10.3
Data
10.4
Single Plot
10.5
Compare Distributions
10.5.1
Data
10.6
Horizontal Box Plot
10.6.1
Notch
10.6.2
Jitter
10.7
Outliers
10.8
Aesthetics
10.8.1
Specify Values
10.9
Map Variables
11
Histograms
11.1
Introduction
11.2
Data
11.2.1
Data Dictionary
11.3
Plot
11.3.1
Specify Bins
11.4
Aesthetics
11.5
Putting it all together…
11.6
Bin Width
11.7
Line Type
11.8
Line Size
11.9
Map Variables
12
Legends
13
Faceting
13.1
Introduction
13.2
Grid
13.2.1
Vertical
13.2.2
Horizontal
13.2.3
Vertical & Horizontal
13.2.4
Scales
13.2.5
Switch Labels
13.3
Wrap
13.3.1
Specify Rows
13.3.2
Specify Columns
13.3.3
Scales
13.3.4
Rows & Columns
14
Themes
14.1
Introduction
14.2
Basic Plot
14.3
Axis
14.3.1
Text
14.3.2
Ticks
14.3.3
Line
14.4
Legend
14.4.1
Background
14.4.2
Text
14.4.3
Title
14.4.4
Position
14.5
Themes
14.5.1
Classic Dark on Light
14.5.2
Default Gray
14.5.3
Light
14.5.4
Minimal
14.5.5
Dark
14.5.6
Classic
14.5.7
Void (Empty)
References
Published with bookdown
Data Visualization with ggplot2
References