Even more detailed is the original book by Leland Wilkinson, on which ggplot2 is based: https://link.springer.com/book/10.1007/0-387-28695-0.
The original implementations go back to SYSTAT and SPSS GPL (Graphics Production Language).
GPL especially, with its statement-based approach, has arguably better ergonomics for interactively and iteratively producing plots compared to function-based approaches.