Created
October 12, 2017 15:44
-
-
Save chrissyhroberts/72c302b643df4e9554b873a8164bb96b to your computer and use it in GitHub Desktop.
#draws a 96 cell grid and adds some data to the cells : useful for drawing plate maps for 96 well laboratory plates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#draws a 96 cell grid in R and adds some data to the cells : useful for drawing plate maps for 96 well laboratory plates | |
title="PLATE X" | |
values<-paste(c("A","B","C"),1:3,sep="\n") | |
verticals<-c(rep(7.5,12),rep(6.5,12),rep(5.5,12),rep(4.5,12),rep(3.5,12),rep(2.5,12),rep(1.5,12),rep(0.5,12)) | |
h2<-rep(seq(0.5,11.5,1),8) | |
#draw the grid | |
plot(c(0,12),c(0,8),pch=0,col="white",axes=FALSE,xlab="",ylab="") | |
abline(v=c(0:12)) | |
abline(h=c(0:8)) | |
textsize=0.6 | |
text(-0.3,0.5,"H",cex=textsize);text(-0.3,1.5,"G",cex=textsize);text(-0.3,2.5,"F",cex=textsize);text(-0.3,3.5,"E",cex=textsize);text(-0.3,4.5,"D",cex=textsize);text(-0.3,5.5,"C",cex=textsize);text(-0.3,6.5,"B",cex=textsize);text(-0.3,7.5,"A",cex=textsize) | |
text(0.5,8.2,"01",cex=textsize);text(1.5,8.2,"02",cex=textsize);text(2.5,8.2,"03",cex=textsize);text(3.5,8.2,"04",cex=textsize);text(4.5,8.2,"05",cex=textsize);text(5.5,8.2,"06",cex=textsize);text(6.5,8.2,"07",cex=textsize);text(7.5,8.2,"08",cex=textsize);text(8.5,8.2,"09",cex=textsize);text(9.5,8.2,"10",cex=textsize);text(10.5,8.2,"11",cex=textsize);text(11.5,8.2,"12",cex=textsize) | |
for (i in 1:96){text(horizontals[i],verticals[i],values[i],cex=textsize,col="red")} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment