[R] how to add p values to bar plot?
Ana Marija
@okov|c@@n@m@r|j@ @end|ng |rom gm@||@com
Sat Sep 28 04:21:30 CEST 2019
Hi,
I have a bar plot (green colors in attach) which I made with this:
library(ggplot2)
df <- data.frame("prop" = c(7.75,70.42), "Name" = c("All Genes","RG Genes"))
p<-ggplot(data=df, aes(x=Name, y=prop,fill=Name)) +
geom_bar(stat="identity")+ labs(x="", y = "Proportion of cis
EQTLs")+ scale_fill_brewer(palette="Greens") +
theme_minimal()+theme(legend.position = "none")
p
What do I need to change in my plot so that I have plot with p value
shown on the 2nd attached figure (gray and blue)?
Thanks
Ana
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2019-09-27 at 9.20.50 PM.png
Type: image/png
Size: 79262 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20190927/9b855c0f/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2019-09-27 at 1.30.37 PM.png
Type: image/png
Size: 106834 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20190927/9b855c0f/attachment-0001.png>
More information about the R-help
mailing list