library(ggplot2)
library(gcookbook)
p <- ggplot(marathon,aes(x=Half,y=Full))+
geom_point()
p
ggsave("point.svg",plot = p1,width = 15,height = 15,units = "cm")
ggsave函数如下:
ggsave(
filename,
plot = last_plot(),
device = NULL,
path = NULL,
scale = 1,
width = NA,
height = NA,
units = c("in", "cm", "mm", "px"),
dpi = 300,
limitsize = TRUE,
bg = NULL,
...
)