ggsave保存ggplot画图的文件
p1 = ggplot(penguins,
aes(x = bill_length_mm, y = bill_depth_mm, color = sex)) +
geom_point(aes(color = species))+
theme_bw()
ggsave(p1,
filename = "my_first_plot.pdf",
height = 4.95,
width = 6.04,
dpi = 300)
网友评论