The geom_text and geom_label functions do not specifiy text size the same way as the rest of ggplot2 elements do. For consistent text sizes, we can apply a simple conversion.

Reading time: 2 minutes.

Placing stacked bar chart labels on a smooth path makes them easier to compare.

Reading time: 4 minutes.

How to place legible labels for points on a curve in ggplot2

Reading time: 3 minutes.

You can put the caption on the line as the x-axis title

Reading time: 3 minutes.

The paste and paste0 functions have a recycle0 argument that returns an empty vector when any part of the string is empty.

Reading time: 1 minutes.

Posts from my assessment blog (2010–2020)