在绘制acf& amp时,修改绘图标题和Y轴标签。 CCF

时间:2015-05-30 08:18:14

标签: r plot axis-labels

我有以下互相关函数(ccf)和acf类,我试图绘制:

> data.ccf<-structure(list(acf = structure(c(0.00370070496127902, 0.00206467231169963, 
0.0225750357110768, 0.00298746518949757, 0.0145032913293758, 
0.00963688419028638, 0.0333911509122289, 0.0339875564324283, 
0.0250934925494934, 0.000676008442887869, 0.00492135501146539, 
-0.00592692854683653, -0.0107895022365464, 0.00609386610167392, 
-0.00984595563932813, -0.0171226578533912, -0.0293648412902752, 
-0.0462922652753253, -0.0353820065425828, -0.0183974934967957, 
0.0288914327057706, 0.0464637907082781, 0.054885909543429, 0.0700788950534636, 
0.0693506012009064, 0.0859920376824603, 0.104448361559048, 0.077634145913444, 
0.0749334881299481, 0.0624151983030089, 0.0681461368510607, 0.0646564935926327, 
0.0420602515535845, 0.047867004655121, 0.0393482900110428, 0.0176073231017014, 
0.0215130830865146, -0.00489290354607561, -0.0134508219619577, 
-0.0363364336004547, -0.0193789240783189), .Dim = c(41L, 1L, 
1L)), type = "correlation", n.used = 360L, lag = structure(c(-20, 
-19, -18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, 
-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
12, 13, 14, 15, 16, 17, 18, 19, 20), .Dim = c(41L, 1L, 1L)), 
series = "X", snames = "Variable 1 & Variable 2 "), .Names = c("acf", 
"type", "n.used", "lag", "series", "snames"), class = "acf")

> plot(data.ccf)

这导致以下情节:

enter image description here

简单地说,我想摆脱标题和Y轴标签。我试图将mainylab设置为NULL而没有任何成功。

1 个答案:

答案 0 :(得分:6)

您可以尝试:

plot(data.ccf, main = "", ylab = "")

plot(data.ccf, main = NA, ylab = NA)

这两个对我来说都有以下结果:

enter image description here