plot(example1$x_coord,example1$y_coord,
col = c("red","blue")[(example1$group==1)+1],
cex = 2,pch = c(19,8)[(example1$group==1)+1],xlab = "X Coordinate",
ylab = "Y Coordinate",main = "Example MRBP data set",cex.lab = 1.3,xlim = c(1,5),
ylim = c(0,6))
legend(x = 1,y = 6,legend = c("Group 1","Group 2"),col = c("red","blue"),
pch = c(19,8),cex = 1.5)
Run the code above in your browser using DataLab