2016-05-26 4 views
1

RStudioのグ​​ラフウィンドウと同じ解像度でグラフイメージを出力しようとしていますが、失敗しています。ここで私が使用していたコードは次のとおりです。私は単純に(私はサイズのウィンドウを持っているかによって設定された寸法で)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) 
#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() 
ここ

はイメージです。

enter image description here

ここで、JPEG機能を用いて画像がある: (#jpeg("LEAT.jpeg", width = 4, height = 3, units = 'in', res = 1200)

enter image description here

これらのグラフのインポート/作成関数のいずれかを設定して同様のグラフを作成するにはどうすればよいですか?

答えて

0

これは動作するようだが、男は試行錯誤をたくさん取っ:

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() 

画像:

enter image description here

関連する問題