Are you using the ggplot2movies data set or something else? As an example I used that, the code you used works for this but there are NA's for the years that were not specified in the level set, I'm wondering, do you really only have the years 2014 and 2015 in your dataset? Can you attach a small subset of you data?
library(ggplot2movies)
data(movies)
movies$year <- factor(movies$year, levels = c(1971, 2015), labels = c("Y1971", "Y2015"))