Entering edit mode
4 months ago
G.S
▴
60
Hello,
I plotted a density plot for 2 time points for 3 genes. I want to combine both time points in one plot.
I am not sure how to do it? any suggestion would be helpful.
Here is the code I used for plotting:
dp_9_a = ggplot(mr_d_9_rsv, aes(x=abs(LFC), fill=id)) +
geom_density(alpha=.3) +
geom_vline(xintercept = 0, color="red", lwd=1, linetype="dashed")+
facet_grid(. ~ id) +
ylim(c(0,1.5)) +
xlim(c(-2,9))+
theme_bw()+
theme(plot.title = element_text(hjust = 0.5,size=12), legend.position = "none")
dp_24_a = ggplot(mr_d_24_rsv, aes(x=abs(LFC), fill=id)) +
geom_density(alpha=.3) +
geom_vline(xintercept = 0, color="red",lwd=1, linetype="dashed")+
facet_grid(. ~ id) +
theme_bw() +
ylim(c(0,1.5)) +
xlim(c(-2,9))+
theme(plot.title = element_text(hjust = 0.5,size=12), legend.position = "none")
Thanks in advance