'give different shapes to object in scatter plot
I have a basic question with ggplot I have a dataframe with a column merged from another df. there are about 10000 rows:
mytab
FC1 ID FC2
1 0.3379713197 ff 0.3392757588
2 -0.8787452838 gg -0.8746986951
3 0.5918856725 Gm 0.5994792851
4 -0.0180385364 xx -0.0261098608
5 0.1258282187 ii 0.1358723158
basically I need to do a scatter plot which in X there is FC1, in Y FC2. I do this:
mytab$up <- NA
mytab$up[mytab$FC1>=0] <- "red"
mytab$up[mytab$FC2>=0] <- "darkred"
mytab$down <- NA
mytab$down[mytab$FC1<=0] <- "lightblue"
mytab$down[mytab$FC2<=0] <- "blue"
Values are similar so if I colour them, they overlaps so I can't see the position of IDs on scatter plot. my idea is to give a different shape to values to be able to distinguish them. I don't know if it is the right way so I will appreciate your help.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
