@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'))