This is what I want to plot:
Using ggplot2, I can plot the correct bars, but with the locus number stated on the x-axis instead of the chromosome number. It just plots the number of each bar, like 1,2,...,500, but it doesn't show the chromosome. How can I achieve this?
Reproducible example:
p <- ggplot(data = info, aes(x = number,y= Fst,fill = Chromesome))
p + geom_bar(stat = "identity") + labs(x = "Chromosome", y =Fst)
number Chromosome Fst
1 1 0.5
2 1 0.6
3 2 0.7
4 2 0.9
5 3 0.7
6 3 0.1
7 4 0.3
8 4 0.4
9 5 0.5
10 5 0.6
11 6 0.7
12 6 0.8
13 7 0.9