Graphics for R Programmings
Graphics in R centres on ggplot2, which builds charts from layers using the grammar of graphics. You map data columns to aesthetics such as x, y, colour and size, add geoms like points, lines and bars, and refine scales, facets and themes. The same grammar covers scatter plots, histograms and boxplots.
Stage: Visualisation and Statistics · Part of the R Programming roadmap · Last reviewed 19 November 2026
What to learn in Graphics
- Build a scatter plot with aes() and geom_point()
- Choose between geom_col, geom_bar and geom_histogram correctly
- Split a chart into panels using facet_wrap()
- Adjust scales, labels and themes for a clean presentation
- Save a chart at a chosen size with ggsave()
Graphics interview questions
What is the difference between geom_bar and geom_col?
geom_bar counts rows for you, so you supply only x and it computes the height. geom_col draws bars from a y value already in the data. Use geom_col when you have summarised numbers, and geom_bar when plotting raw observations.
What does aes() do in ggplot2?
aes() maps columns in your data to visual properties such as position, colour or size. Anything inside aes() varies with the data, while a fixed value set outside aes(), like colour = 'blue', applies to every point equally.
Where Graphics fits in the R Programming roadmap
Graphics belongs to the Visualisation and Statistics stage (beginner level), which takes about 19 hours. Understand data.
Other units in this stage
Back to the full R Programming roadmap