I am trying to use different colors for subgroups of genes in my ggplot. Currently, I used this script
ggplot() +
geom_point(data=log2(gdat), aes_string(x="WT", y="mutant"),
col=ifelse(gdat$Rep==1, "blue", "gray"), alpha=3/10, size=2)+
geom_point(data=log2(gdat), aes_string(x="WT", y="mutant"),
col=ifelse(gdat$Rep==2, "red", "gray"), alpha=3/10, size=2, shape=3)+
geom_abline(intercept = 0, slope = 1) +
scale_x_continuous(trans='log2') +
scale_y_continuous(trans='log2')
This is the last part of the script that I used to plot them. I have a group of genes in red and group of genes in blue. However, most of them falls into the group colored in gray (which covers the whole graph and makes the other two subgroups invisible). Is there a way to make this gray subgroup transparent, so the other two groups would be visible? Thanks all.
gdat
? Usedput
. – markus