Overrides the default `ggplot` function from the ggplot2 package, adding the capability to track the history of plot construction. This function initializes a history attribute in the `ggplot` object.
ggplot(...)
A ggplot object of class 'ggcall', with an additional attribute 'ggcall' that stores the history of plot construction.
library(ggplot2, exclude = "ggplot")
p <- ggplot(mtcars, aes(x = wt, y = mpg))
# the + function has to come from ggcall package
attr(p + geom_point(), "ggcall")
#> ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point()