Let’s start with a very basic
scatterplot. By default,
ggplot2 offers a grey background with white major and
It is possible to change that thanks to the
theme() function. Keep reading to learn how!
Two options of the
theme() functions are available to
control the map background color.
plot_background controls the color of the whole chart.
panel.background controls the part between the axis.
Both are rectangles, their features is thus specified through an
Two main types of grid exist with
ggplot2: major and minor.
They are controled thanks to the
Once more, you can add the options
the end of the function name to control one orientation only.
Features are wrapped in an
element_blanck() will simply removing the grid.