Hello,
I would like to know how to change the display order of the labels of the x axis in each of my area
For example in my area1, I would like my "names" to be displayed as follows: "Yier", "Axo", "Hute", my area2 : "Chyt", "Pite".
Moreover, how to change the order of display of the areas, for example to have 2,1,3 instead of 1,2,3
df <- data.frame (value = c(96.14,94.62,92.41,91.27,84.14,74.91,82.14),
names = c("Axo", "Pite", "Yier","Molu","Hute","Chyt","Chut"),
area = c("1","2","1","3","1","2","3"))
df %>%
ggplot(aes(x = names,value)) +
geom_col() +
facet_grid(~factor(area,levels = c("1","2","3")),
scale = "free_x", space = "free_x", switch = "x")
Thanks