问题描述
我正在尝试保存用 R 中的 ggplot 创建的绘图,以粘贴到 Word 中的报告中,但我遇到了尺寸问题。
plot_2.2 <- ggplot(data = data_2.2_melted,aes(x=value,y=variable,shape = Gender)) +
geom_point(size = 1.8,alpha = 0.5,col = "black")
#Change size of text and position of legend
plot_2.2_final <- plot_2.2 + theme(axis.text = element_text(size = 10,colour = "black")) +
theme(legend.position = "left",axis.title.x=element_blank(),axis.title.y=element_blank()) +
scale_shape_manual(values = c("M"= 17,"F" = 19))
我正在努力
png(file="folder/saving_plot2.2.png",width=790,height=840)
plot_2.2_final
dev.off()
但是尺寸太小了。如果我尝试更大的尺寸,例如
width=990,height=1140)
plot_2.2_final
dev.off()
我仍然得到第一个图的尺寸。这就像 R 强加了大小限制。
当我尝试直接从 R 复制(即绘图 - 导出 - 复制到剪贴板)时,我遇到了类似的问题,因为我可以获得更大的绘图。 我也尝试保存为 PDF 以获得更大的图,但它更小。
有人可以帮忙吗? 谢谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)