Hi,

I have a barplot like this:

![enter image description here][1]


  [1]: https://imgur.com/pizrVlq.jpg

I created it with this code:

    toplot.N <- data.frame( set=c("FLCN", "All SNPs", "eQTL from 103 genes","All eQTL"),
                        FDR =c(FDR1FI,FDR2FI,FDR3FI,FDR4FI))

    p<-ggplot(toplot.N, aes(x=set, y=FDR, fill=set)) + labs(y = "pi_1")+
       geom_bar(stat="identity")+theme(axis.title.x = element_blank())+
      geom_hline(yintercept=0.05, linetype="dashed", color = "red")
    p

How would I change this so that the order of bars is: "All SNPs","All eQTL","eQTL from 103 genes","FLCN"

Thanks
Ana


We could change order of factor levels before plotting:

    toplot.N$set <- factor(toplot.N$set,
                           levels = c("All SNPs", "All eQTL", "eQTL from 103 genes", "FLCN"))

