我在这里有一个相当简单的问题:
我自定义了我的x轴,但不知何故,y轴完全消失了。 我该如何把它带回来?
zoo.vol<-as.zoo(data)
times<-seq(start(zoo.vol),end(zoo.vol),by="year")
plot(x = zoo.vol,ylab = "Volatility", main = "my title", at=times, format="%Y",col = tsRainbow,screens = 1,axt="n")
我的zoo.vol看起来像这样:
structure(c(0.0151487553475412, 0.0145973941978265, 0.0147267840693453,
0.0160134529429522, 0.0154340940175316, 0.0148705095898274, 0.0144180796103523,
0.0156263569934272, 0.0150973775246807, 0.0158179328705817, 0.0124984401178442,
0.0118049612119821, 0.0118113562642818, 0.0116271323991807, 0.0110968729656786,
0.0106359654383497, 0.0134419598568456, 0.0126830764652812, 0.0121315673959188,
0.0127575642807472, 0.0100602793776595, 0.00965703285524349,
0.00946107070266373, 0.00966515004638001, 0.00987951140648287,
0.0095523581423164, 0.0108939716700509, 0.010706535594705, 0.0102804827502289,
0.0112660905807839), .Dim = c(10L, 3L), .Dimnames = list(NULL,
c("A", "B", "C")), index = structure(c(10595, 10596, 10597,
10598, 10599, 10602, 10603, 10604, 10605, 10606), class = "Date"), class = "zoo")
所以一张图上有三个图表。
提前谢谢。