png(filename = "Rplot%03d.png",
width = 480, height = 480, units = "px", pointsize = 12,
bg = "white", res = NA, ...,
type = c("cairo", "cairo-png", "Xlib", "quartz"), antialias)
あなたは、フォントサイズを固定しているしたい場合は、幅のいくつかの関数としてCEXパラメータを使用することができます必要な解像度
を取得するために、幅と高さを使用するようになりますため、正しい方法高さ ので、例えば
height = width * 1.2
cex = width/300
When width = 400
Height = 480
Cex = 1.33
ジャスト幅
01の関数として右CEX変換パラメータを見つけますこれら3つの簡単なコード
チェックアウトは
width=600
cex=width/300
png('myfile1.png', pointsize=10, width=width , height=width*1.2)
plot(cars , cex.lab=cex, cex=cex)
dev.off()
width=900
cex=width/300
png('myfile2.png', pointsize=10, width=width , height=width*1.2)
plot(cars , cex.lab=cex, cex=cex)
dev.off()
width=1200
cex=width/300
png('myfile3.png', pointsize=10, width=width , height=width*1.2)
plot(cars , cex.lab=cex, cex=cex)
dev.off()
フォントサイズはプロットの解像度に比例して一定のまま