4.15 Lab: Labels & Annotations (1)
- Labels
geom_text()
: Add text, e.g., labels as in Figure 4.5
- Annotations
geom_text()
: Add text descriptions or to label points- Most plots won’t benefit from labelling every observation, but labeling outliers/important points is useful
geom_rect()
: to highlight interesting rectangular regions of the plot- has aesthetics
xmin
,xmax
,ymin
andymax
- has aesthetics
geom_line()
,geom_path()
andgeom_segment()
: Add linesgeom_vline()
,geom_hline()
andgeom_abline()
: Add reference linesannotate()
: Annotate text in textbox

Figure 4.5: Labels and annotations