Order of variables ggplot2 with reorder()

The order of appearance is controlled in the ggplot aesthetics via redorder()

p <- ggplot(

data = d, aes(x = variable, y = reorder(film, index), fill = value, colour=&#8221;white&#8221;))

# sort my films depending on the index variable
ggplot(d, aes(x = variable, y = reorder(film, index))

# descending
ggplot(d, aes(x = variable, y = reorder(film,desc(index))