我有一个 ggplot 元素,称为“p”:
p <- qplot(hp, mpg, data=mtcars, shape=am, color=am,
facets=gear~cyl, main="Scatterplots of MPG vs. Horsepower",
xlab="Horsepower", ylab="Miles per Gallon")
然后我打电话给“p”并得到一个情节。
如何调用 p 以便查看变量的分配:
>somefunction(p)
qplot(hp, mpg, data=mtcars, shape=am, color=am,
facets=gear~cyl, main="Scatterplots of MPG vs. Horsepower",
xlab="Horsepower", ylab="Miles per Gallon")