Skip to content

Instantly share code, notes, and snippets.

@PoisonAlien
Last active April 28, 2019 21:33
Show Gist options
  • Save PoisonAlien/266684506c05415c6ea9e8710931beed to your computer and use it in GitHub Desktop.
Save PoisonAlien/266684506c05415c6ea9e8710931beed to your computer and use it in GitHub Desktop.
Matrix style ATGC plot
png(filename = "xx.png", width = 1200, height = 700, res = 70, bg = "white")
par(bg = 'black', mar = c(0, 0, 0, 0))
plot(1:50,1:50, pch = NA, axes = FALSE)
for(i in 1:50){
x = sample(x = c("A", "T", "G", "C"), size = 50, replace = TRUE)
points(x = rep(i, 50), y = 1:50, pch = x, cex = 0.8, col = "green")
}
par(family = "serif")
legend(x = "center", legend = "M E T H R I X", text.col = "green", bg = "black", cex = 3, adj = 0.1)
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment