为什么我无法更改剧情标题和轴标题的字体大小?

时间:2016-01-25 14:15:52

标签: r plot title

在这种情况下,我无法更改轴标题的字体,字体大小和图标题。 enter image description here

plot(seoul032801_var, cex = 1.5, pch= 16, col = "black",xlab="Distance (Km)", ylab = ~ "Semivariance ( " *( mu * g / m^3)^2 * ")", main=" Semivariogram for 032801", font.main = 1, cex.lab = 2)

在这里,我正在更改cex.lab或font.main但它们没有改变!在这种情况下,我希望绘图的标题是平面航空字体和轴标题需要稍微大一点。

另外,在图中我可以在上侧和右侧看到一些刻度标记。是否可以删除此标记?

This is my dataset. You can check. 这是我的R代码:[你可以检查我的代码的最后一行]

library(sp)
library(gstat)
library(automap)
library(rgdal)
library(e1071)

seoul032801 <- read.csv("seoul032801.csv")
seoul032801<-na.omit(seoul032801)

coordinates(seoul032801) <- ~LON+LAT
proj4string(seoul032801) =  "+proj=longlat +datum=WGS84" 
seoul032801<-spTransform(seoul032801, 
                         CRS("+proj=utm +north +zone=52 +datum=WGS84"))
seoul032801@coords<- seoul032801@coords/1000

#variogram modeling
seoul032801_var<-variogram(PM10 ~1, data=seoul032801, width = 2.8, cutoff =33)
seoul032801_var
plot(seoul032801_var, cex = 1.5, pch= 16, col = "black",xlab="Distance (Km)", ylab = ~ "Semivariance ( " *( mu * g / m^3)^2 * ")",
     main=" Semivariogram for 032801", font.main = 1, cex.lab = 2)

1 个答案:

答案 0 :(得分:1)

查看?plot.gstatVariogram - 它绘制了一个格子图。事情有点不同:

library(gstat)
library(sp)
data(meuse)
coordinates(meuse) = ~x+y
v <- variogram(log(zinc)~1, meuse)
plot(v, xlab=list(cex=2, font=2), main=list(font=4, cex=5, label="foo"))