I have data which looks like this:
And here is my code:
ggplot(df, aes(Month.of.Death, fill=as.factor(Month.of.Death)))+
geom_bar(color="black",fill="brown3")+
theme(text = element_text(size=15),axis.text.x = element_text(angle=90, hjust=1))+
labs(title = "Liczba śmierci dziennikarzy w danym miesiącu", x="Miesiąc", y="Liczba dziennikarzy")
So now what is my problem. I was trying to make put these columns in order but I do not know how to do it. I have been trying to do it using this:
miesiac <- c("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "Novermber", "December")
but when I try to add it as my new X axis it says it has different amount of elements then Y. I do understand the problem but I am unable to find solution I saw people in internet doing it this way but either I am stupid or it does not work for my problem. Please tell me how to sort these columns. Thanks in advance!