What is a good way to read the source code of ggplot2?

I want to understand better how ggplot2 is implemented. I have read through ggplot2-book.org and use ggplot2 for a few years. Any suggestions about how to read the ggplot2 source code?

The whole sourcecode can be found in the github repository here: GitHub - tidyverse/ggplot2: An implementation of the Grammar of Graphics in R

You can also write the name of a function (without the parentheses) an press enter in the command line of press F2 over a function.

Another good resource is the "Extending ggplot2" vignette (Extending ggplot2) which guides you through some aspects of ggplot2's internal workings.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.