I use package ggplotR, I made this graph with the code below:
p3 = data.frame(cbind(c(1:70),
c("G1" , "G2" , "G1" , "G1" , "G1" , "G2" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1",
"G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G2" , "G1" , "G2" , "G1" , "G1" ,
"G1" , "G1" , "G1" , "G2" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" ,
"G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" ,
"G1" , "G1" , "G1" , "G1" , "G2" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" , "G1" ,
"G1" , "G1" , "G1" , "G1" , "G2"),
c(rep("B",35),rep("C",15),rep("A",20))
))
colnames(p3)=c("Num","L" , "G")
library(ggthemes)
library(ggplot2)
pp <- ggplot(p3, aes(Num, G)) +
geom_tile(aes(fill = L), colour = "white")
pp + theme(legend.position="bottom", axis.text.x = element_text(angle=90, size=7,vjust=0.5)) +
scale_fill_manual(values=c("#990000","#E69F00","#999999"))

I would like to reorder the y-axis values according to the number of bars (= G variable)
Expected Story:

Many thanks for your help!