Hi I have a data (trail) like this
chr pos features chr1 1232322 a chr1 2344433 a chr1 5355555 a chr1 17555533 b chr1 18655535 b chr1 19755535 b
I want to make a density plot using R (ggplot2) for the features namely a and b. I want all the "a" features above x-axis and "b" features to be below x-axis. this is what i have tried
ggplot(trail) + geom_histogram(aes(x=pos),binwidth=1000000)
but this plots all above the axis.