Hi,
I have created a ggplot and there are a number of categories on the x axis. Some have quite long names so they are merging into one another. Is there any way I can change the categories so that they are written vertically?
I have tried these but neither work:
ggplot(data=adm_filtered, aes(x=injury_type, y=number_of_admissions, fill=age_group)) +
geom_bar(stat="identity") + facet_wrap(vars(sex), nrow=4, ncol=2) + (x=injury_type, las=3)
ggplot(data=adm_filtered, aes(x=injury_type, y=number_of_admissions, fill=age_group)) +
geom_bar(stat="identity") + facet_wrap(vars(sex), nrow=4, ncol=2) + ((x=injury_type, angle=45))
Thanks!