LaTeX-Styling-ggplot2
October 2, 2025 · View on GitHub
Styling R ggplot2 graphics with LaTeX.
Key Files
- TUGboat_44_108.R R code.
Software Requirements
- Ghostscript 10.00.0.
- R.
- An R IDE, e.g., RStudio (optional).
N.B. The code was not designed for use with Ghostscript more recent than version 10.00.0.
System Configuration
Please ensure the R installation has the following packages installed:
- egg
- extrafont
- ggplot2
- gridExtra
- knitr
- latex2exp
Detailed system configuration details are provided in Stenborg (2023), below.
Reference
Stenborg, T 2023, "Styling R ggplot2 graphics with LaTeX", TUGboat, vol. 44, no. 1, pp. 108–109.