Geometries in graphics
The previous section mostly covered scatter plots. In this section, we will go over two additional common types of plots: bar charts and line plots. We will discuss different ways to construct these plots, focusing on the geometries that can be used to control layer-specific visual properties of the graph.
Understanding geometry in scatter plots
Let us revisit the scatter plot and zoom in on the geometry layer. The geometry layer determines how the plot actually looks, which is an essential layer in our visual communication. At the time of writing, there are over 50 geometries we can choose from, all of which start with the geom_
keyword.
Some overall guidelines apply when deciding which type of geometry to use. For example, the following list contains the possible kinds of applicable geometries for a typical scatter plot:
- Point, which visualizes the data as points
- Jitter, which adds positional jittering to a scatter plot
- Abline, which...