Data Visualization

Math annotations in ggplot2 with latex2exp

The latex2exp package translates math expressions from LaTeX into R’s internal mathplot format. This can be useful when annotating a ggplot2 visualization. This post illustrates some differences in the way latex2exp works with ggplot2’s layer types, such as geoms, annotations, labels, facets, and axis texts.