If you want to learn more about grammars of graphics, you can check out the following resources on the topic:
- The Grammar of Graphics by Leland Wilkinson
- A Layered Grammar of Graphics by Hadley Wickham
Leland Wilkinson’s book is a standard lecture on this topic. Hadley Wickham’s paper, which you can read as a free PDF online, describes the basics for the implementation of a grammar of graphics in the R library ggplot2 that serves as the base for Python’s plotnine
library.