生成与RStudio图形窗口尺寸/分辨率相同的图形图像

生成与RStudio图形窗口尺寸/分辨率相同的图形图像,r,graph,rstudio,R,Graph,Rstudio,我试图输出与RStudio中图形窗口分辨率相同的图形图像,但一直失败。以下是我正在使用的代码: # Leading edge arrival times #tiff(file = "LEAT.tiff", width = 6400, height = 3200, units = "px", res = 400) #Cairo(file="LEAT.png", type="png", units="in", width=4, height=3, pointsize=12, dpi=20) #jpe

我试图输出与RStudio中图形窗口分辨率相同的图形图像,但一直失败。以下是我正在使用的代码:

# Leading edge arrival times
#tiff(file = "LEAT.tiff", width = 6400, height = 3200, units = "px", res = 400)
#Cairo(file="LEAT.png", type="png", units="in", width=4, height=3, pointsize=12, dpi=20)
#jpeg("LEAT.jpeg", width = 4, height = 3, units = 'in', res = 1200)
#tiff("LEAT.tiff", width = 4, height = 3, units = 'in', res = 600)
LEAT <- hist(data)
plot(LEAT, 
     col= "darkblue", 
     xlim=c(0,30), 
     main="Leading Edge Arrival Times", 
     xlab="Hours", 
     ylab="Frequency")  
mtext("(Using predicted 90th percentile streamflow)", side=3)
#dev.off()
#前沿到达时间
#tiff(文件=“LEAT.tiff”,宽度=6400,高度=3200,单位=“px”,分辨率=400)
#Cairo(file=“LEAT.png”,type=“png”,units=“in”,宽度=4,高度=3,点大小=12,dpi=20)
#jpeg(“LEAT.jpeg”,宽度=4,高度=3,单位=in',分辨率=1200)
#tiff(“LEAT.tiff”,宽度=4,高度=3,单位=英寸,分辨率=600)

LEAT这似乎可行,但伙计,这需要很多尝试和错误:

tiff("LEAT_2.tiff", width = 800, height = 600, units = 'px')
LEAT <- hist(data)
plot(LEAT, 
     col= "darkblue", 
     xlim=c(0,30), 
     main="Leading Edge Arrival Times", 
     xlab="Hours", 
     ylab="Frequency")  
mtext("(Using predicted 90th percentile streamflow)", side=3)
dev.off()
tiff(“LEAT_2.tiff”,宽度=800,高度=600,单位=px”)

LEAT这似乎可行,但伙计,这需要很多尝试和错误:

tiff("LEAT_2.tiff", width = 800, height = 600, units = 'px')
LEAT <- hist(data)
plot(LEAT, 
     col= "darkblue", 
     xlim=c(0,30), 
     main="Leading Edge Arrival Times", 
     xlab="Hours", 
     ylab="Frequency")  
mtext("(Using predicted 90th percentile streamflow)", side=3)
dev.off()
tiff(“LEAT_2.tiff”,宽度=800,高度=600,单位=px”)
皮革