In my dataset I have 2 continuous variables (A1BG and A2LD1) and 1 categorical (Class).
I'm trying to plot A1BG and A2LD1 and color coding by class which is good so far.
however, how to differentiate between A1BG and A2LD1 by shape?
Here's my code so far..
ggplot(RNA, aes(x = A1BG,
y = A2LD1,
col = Class,
main = "Relationship Between A1BG and A2LD1")) + geom_point()+ theme(panel.grid =element_blank(),
panel.background = element_rect(fill = "white"),
panel.border = element_rect(colour = "black",
fill = NA, size = 0.2))
Sample Data:
(A1BG = c(5.620562952, 7.591106401, 8.348814005, 7.399435165, 7.494443613, 7.005119237, 7.825150239, 9.84125156, 7.711686244, 8.019511781),A2LD1 = c(5.243981286, 6.148334212,7.334008637, 6.853456781, 7.026735889, 5.723555831, 7.032773092, 5.538007298, 6.077351966, 6.283886593), Class = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0))