Is it possible to assign plot()
output in the same way as ggplot2 output?
e.g.
my_plot <- plot(c(1,2,3))
my_plot
# [1] NULL
The above doesn't work, but the following (for ggplot) does:
library(ggplot2)
my_ggplot <- ggplot(mapping = aes(x = 1:3, y = c(1,2,3))) + geom_point()
# Running this will show the plot
my_ggplot