1
#test.R
x <- y <- seq(10,70,10)
png("test.png")
plot(x, y, type='o', col='red')
grid()
title(main="title", font.main=5)
title(xlab="B", col.lab="black")
title(ylab="C", col.lab="black")
测试OS: CentOS的7,Debian的8.1 的R - 格拉夫字体问题
运行下面的命令。
Rscript test.R - > create test.png。
我的图形很奇怪。
标题,x和y轴chacter不是英语。
如何打印正常的英文字符?
从'par'的'font'部分:* FONT 5有望是符号字体*。没有什么奇怪的,如果你选择'font.main = 5'。你应该选择1,2,3或4。 – 2015-10-20 09:16:36