ACF Plot with ggplot2: Setting width of geom_bar

前端 未结 4 1015
时光说笑
时光说笑 2021-02-18 23:25

With acf we can make ACF plot in base R graph.

x <- lh
acf(x)

4条回答
  •  执笔经年
    2021-02-19 00:12

    @konrad; try the following code:

    library(ggfortify)
    p1 <- autoplot(acf(AirPassengers, plot = FALSE), conf.int.fill = '#0000FF', conf.int.value = 0.8, conf.int.type = 'ma') 
    print(p1) 
    library(cowplot) 
    ggdraw(switch_axis_position(p1, axis = 'xy', keep = 'xy'))
    

提交回复
热议问题