library(tsibble)
library(tsibbledata)
library(lubridate)
bar_plot(ansett, "year(Week)", "Passengers")
bar_plot(ansett, "year(Week)", "Passengers", "Class", label_pos = "both")
bar_plot(ansett, "year(Week)", "Passengers", "Class", label_pos = "both", label_inside = "both")
bar_plot(ansett, "year(Week)", "Passengers", "Class", coord_flip = TRUE)
Run the code above in your browser using DataLab