User:James Estevez/Notebook/Spring 2011: Bdellovibrio Independent Study/2011/02/21
Bdellovibrio Independent Study | Main project page Previous entry | ||||||||||||
Generating figures in RNot exactly intuitive, but it's coming along. Location is indicated by a number:
Hexagon BinningI didn't like how these came out so I tried the Source code<syntaxhighlight lang="rsplus">
rm(list = ls()) graphics.off()
bd100_numloc_asc<-read.csv('/home/james/Data/bdcost/R/N/bd100_psortb_asc_numloc.csv') bm_numloc_asc<-read.csv('/home/james/Data/bdcost/R/N/b_marinus_psort_ASC_numloc.csv') library(RSvgDevice) # Output to SVG for direct manipulation in Inkscape devSVG(file='scatter_asc.svg', height=6, width=12, onefile=TRUE) # Height and width are in inches par(mfcol = c(1,2))
plot(bm_numloc_asc$asc,jitter(bm_numloc_asc$F_L_num), main="Average Synthetic Cost (ASC)", sub="B. marinus SJ", xlab = "ATPs/aa", ylab = "Location", pch=".") plot(bd100_numloc_asc$asc,jitter(bd100_numloc_asc$F_L_num), sub="B. bacteriovorax ", xlab = "ATPs/aa", ylab = "Location", pch=".") title(main="Average Synthetic Cost (ASC)") dev.off()
library(hexbin) hplot_bm <- hexbin(bm_numloc_asc$asc,jitter(bm_numloc_asc$F_L_num)) hplot_bd100 <- hexbin(bd100_numloc_asc$asc,jitter(bd100_numloc_asc$F_L_num)) devSVG(file='hex_asc_bm.svg', height=6, width=9, onefile=TRUE) # SVG output plot(hplot_bm, main="Average Synthetic Cost (ASC) in B. marinus SJ", xlab = "ATPs/aa", ylab = "Location") dev.off() devSVG(file='hex_asc_bd100.svg', height=6, width=9, onefile=TRUE) plot(hplot_bd100, main = "Average Synthetic Cost (ASC) in B. bacteriovorax HD100", xlab = "ATPs/aa", ylab = "Location") dev.off() </syntaxhighlight>
|