I have this Rdata:
I want to plot a density graph something like this
, where I can see range of values in
column spanning for each
items. Also, my X-axis should be between -2 to 2 and Y-axis should have cutoff items only (not the numerical values).
This is what I tried, but all I can see is dark lines. Is there any other method to do this?
p <- ggplot(mymat, aes(x=as.numeric(want.IBS), fill=cutoff)) #as suggested
p <- p + geom_density(alpha=0.5)
p <- p + xlab ("IBD") + ylab("cutoff")
p <- p + theme_bw()