我正在尝试使用ggplot()
or绘制一个简单的时间序列qplot()
。横轴是日期,纵轴是数字,简单的折线图就足够了。通常,在使用ggplot()
. 但是,我坚持这一点:
net.t <- structure(c(6, 11, 0, -1, -13), .Names = c("2011-09-01", "2011-12-01",
"2012-03-01", "2012-06-01", "2012-09-01"))
net.t.m <- melt(net.t,id="var")
#After melting 'net.t', it became a vector or array? how to plot that?
qplot(net.t.m,main="Net Promotion Score")+geom_smooth(se=F, size=1.5)
nps.t+labs(y="NPS",x="Year Quarter")+geom_text(aes(label =value),size = 3, vjust = -1)