R图字体问题 #test.R x

R图字体问题 #test.R x,r,R,根据?par,字体部分:字体5应为符号字体。如果选择font.main=5,这并不奇怪。您应该选择1、2、3或4 #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")

根据
?par
字体部分:字体5应为符号字体。如果选择font.main=5,这并不奇怪。您应该选择1、2、3或4

#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") 

x从
?par
font
部分:font 5应为符号字体。如果您选择
font.main=5
,这并不奇怪。您应该选择1、2、3或4。
x <- y <- seq(10,70,10)
par(mfrow=c(2,3), mar=c(4,4,3,3))
for(i in 1:5){
  plot(x, y, type='o', col='red', xlab = "", ylab = "")
  grid()
  title(main="title", xlab="B", ylab="C", font.main=i)
}