Skip to main content
Contents Index
Dark Mode Prev Up Next
\(\require{cancel}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 3.5 Key Takeaways
Always visualize your data ! Summary statistics can hide patterns (and problems) in your data.
ggplot2 follows a consistent grammar: data + aesthetics + geometry.
geom_bar() counts rows automatically;
geom_col() plots pre-summarized values.
Use
labs(),
theme(), and
coord_flip() to improve clarity and readability.
facet_wrap() helps compare groups by creating small multiples.
Trend lines (
geom_smooth()), error bars (
geom_errorbar()), labels (
geom_text()), and reference lines (
geom_hline(),
geom_vline()) help communicate the story in your data.