Improved graph plots and code
BIN
analysis/quantif_20131105/140113-165524120518_07.png
Normal file
|
After Width: | Height: | Size: 154 KiB |
BIN
analysis/quantif_20131105/140113-165543120518_07.png
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
analysis/quantif_20131105/140113-165603120518_06.png
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
analysis/quantif_20131105/140113-165612120518_06.png
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
analysis/quantif_20131105/140113-165632120518_08.png
Normal file
|
After Width: | Height: | Size: 185 KiB |
BIN
analysis/quantif_20131105/140113-165647120518_08.png
Normal file
|
After Width: | Height: | Size: 124 KiB |
BIN
analysis/quantif_20131105/140113-165855120518_08.pdf
Normal file
BIN
analysis/quantif_20131105/140113-165855120518_08.png
Normal file
|
After Width: | Height: | Size: 119 KiB |
BIN
analysis/quantif_20131105/140113-165917120518_08.pdf
Normal file
BIN
analysis/quantif_20131105/140113-165917120518_08.png
Normal file
|
After Width: | Height: | Size: 186 KiB |
BIN
analysis/quantif_20131105/140113-165930120518_07.pdf
Normal file
BIN
analysis/quantif_20131105/140113-165930120518_07.png
Normal file
|
After Width: | Height: | Size: 155 KiB |
BIN
analysis/quantif_20131105/140113-165941120518_07.pdf
Normal file
BIN
analysis/quantif_20131105/140113-165941120518_07.png
Normal file
|
After Width: | Height: | Size: 117 KiB |
BIN
analysis/quantif_20131105/140113-170038131208_06.pdf
Normal file
BIN
analysis/quantif_20131105/140113-170038131208_06.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
analysis/quantif_20131105/140113-170105131208_06.pdf
Normal file
BIN
analysis/quantif_20131105/140113-170105131208_06.png
Normal file
|
After Width: | Height: | Size: 157 KiB |
BIN
analysis/quantif_20131105/140113-170121131208_06.pdf
Normal file
BIN
analysis/quantif_20131105/140113-170121131208_06.png
Normal file
|
After Width: | Height: | Size: 124 KiB |
BIN
analysis/quantif_20131105/140113-170159131208_07.pdf
Normal file
BIN
analysis/quantif_20131105/140113-170159131208_07.png
Normal file
|
After Width: | Height: | Size: 179 KiB |
BIN
analysis/quantif_20131105/140113-170216131208_07.pdf
Normal file
BIN
analysis/quantif_20131105/140113-170216131208_07.png
Normal file
|
After Width: | Height: | Size: 131 KiB |
BIN
analysis/quantif_20131105/140113-170247131208_08.pdf
Normal file
BIN
analysis/quantif_20131105/140113-170247131208_08.png
Normal file
|
After Width: | Height: | Size: 188 KiB |
BIN
analysis/quantif_20131105/140113-170300131208_08.pdf
Normal file
BIN
analysis/quantif_20131105/140113-170300131208_08.png
Normal file
|
After Width: | Height: | Size: 134 KiB |
BIN
analysis/quantif_20131105/140113-170329131208_09.pdf
Normal file
BIN
analysis/quantif_20131105/140113-170329131208_09.png
Normal file
|
After Width: | Height: | Size: 189 KiB |
BIN
analysis/quantif_20131105/140113-170350131208_09.pdf
Normal file
BIN
analysis/quantif_20131105/140113-170350131208_09.png
Normal file
|
After Width: | Height: | Size: 141 KiB |
@@ -105,62 +105,34 @@ ggsave(file=paste("120518_07-degreeDist", format(Sys.time(),"%y%m%d-%H%M%S"), ".
|
||||
|
||||
|
||||
edgelist<-read.delim('/Users/ackman/Data/2photon/120518i/2014-01-03-231550/dCorr.txt')
|
||||
# d2 <- subset(edgelist,filename!='120518_09.tif')
|
||||
|
||||
d2 <- subset(edgelist,filename!='120518_09.tif')
|
||||
|
||||
d3 <- subset(d2,filename=='120518_06.tif')
|
||||
rthresh <- 0.2
|
||||
fnm <- '120518_07'
|
||||
fnm2 <- paste(fnm,".tif",sep="")
|
||||
lo <- 'layout.fruchterman.reingold'
|
||||
# lo <- 'layout.kamada.kawai'
|
||||
# lo <- 'layout.lgl'
|
||||
d3 <- subset(edgelist,filename==fnm2)
|
||||
d4 <- with(d3,data.frame(node1,node2,rvalue))
|
||||
edgelist2<-subset(d4,rvalue > 0.1)
|
||||
edgelist2<-subset(d4,rvalue > rthresh)
|
||||
g <- graph.data.frame(edgelist2, directed=FALSE)
|
||||
E(g)$weight <- E(g)$rvalue
|
||||
E(g)$width <- 1
|
||||
E(g)[ weight >= 0.3 ]$width <- 3
|
||||
E(g)[ weight >= 0.5 ]$width <- 5
|
||||
fastgreedyCom<-fastgreedy.community(g,weights=E(g)$weight)
|
||||
V(g)$color <- fastgreedyCom$membership+1
|
||||
quartz();
|
||||
palette(rainbow(max(V(g)$color),alpha=0.5))
|
||||
plot(g, layout=layout.fruchterman.reingold, edge.width=E(g)$width, edge.color="black")
|
||||
palette("default")
|
||||
title('120518_06, fastgreedy, layout.fruchterman.reingold, default vertex size,alpha0.5')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
d3 <- subset(d2,filename=='120518_07.tif')
|
||||
d4 <- with(d3,data.frame(node1,node2,rvalue))
|
||||
edgelist2<-subset(d4,rvalue > 0.1)
|
||||
g <- graph.data.frame(edgelist2, directed=FALSE)
|
||||
E(g)$weight <- E(g)$rvalue
|
||||
E(g)$width <- 1
|
||||
E(g)[ weight >= 0.3 ]$width <- 3
|
||||
E(g)[ weight >= 0.5 ]$width <- 5
|
||||
fastgreedyCom<-fastgreedy.community(g,weights=E(g)$weight)
|
||||
V(g)$color <- fastgreedyCom$membership+1
|
||||
quartz();
|
||||
palette(rainbow(max(V(g)$color),alpha=0.5))
|
||||
plot(g, layout=layout.fruchterman.reingold, edge.width=E(g)$width, edge.color="black")
|
||||
palette("default")
|
||||
title('120518_07, fastgreedy, layout.fruchterman.reingold, default vertex size,alpha0.5')
|
||||
|
||||
|
||||
|
||||
|
||||
d3 <- subset(d2,filename=='120518_08.tif')
|
||||
d4 <- with(d3,data.frame(node1,node2,rvalue))
|
||||
|
||||
edgelist2<-subset(d4,rvalue > 0.1)
|
||||
g <- graph.data.frame(edgelist2, directed=FALSE)
|
||||
fastgreedyCom<-fastgreedy.community(g)
|
||||
V(g)$color <- fastgreedyCom$membership+1
|
||||
quartz();
|
||||
palette(rainbow(max(V(g)$color),alpha=0.5))
|
||||
plot(g, layout=layout.fruchterman.reingold)
|
||||
palette("default")
|
||||
title('120518_08, fastgreedy, layout.fruchterman.reingold, default vertex size,alpha0.5')
|
||||
|
||||
|
||||
V(g)$color <- fastgreedyCom$membership
|
||||
# quartz();
|
||||
# palette(rainbow(max(V(g)$color),alpha=0.5))
|
||||
mypalette <- adjustcolor(brewer.pal(max(V(g)$color),"Set1"),0.6)
|
||||
palette(mypalette)
|
||||
plot(g, layout=eval(parse(text=lo)), edge.width=E(g)$width, edge.color="black", vertex.label.color="black")
|
||||
# palette("default")
|
||||
title(paste(fnm,', fastgreedy default, ', lo, 'r>', rthresh))
|
||||
dateStr=format(Sys.time(),"%y%m%d-%H%M%S")
|
||||
quartz.save(file=paste(dateStr, fnm, ".png",sep=""), type = "png", dpi=150)
|
||||
quartz.save(file=paste(dateStr, fnm, ".pdf",sep=""), type = "pdf")
|
||||
|
||||
|
||||
|
||||
@@ -169,22 +141,35 @@ title('120518_08, fastgreedy, layout.fruchterman.reingold, default vertex size,a
|
||||
|
||||
edgelist<-read.delim('/Users/ackman/Data/2photon/131208/2014-01-07-003602/dCorr.txt')
|
||||
|
||||
d3 <- subset(edgelist,filename=='131208_08.tif')
|
||||
rthresh <- 0.2
|
||||
fnm <- '131208_09'
|
||||
fnm2 <- paste(fnm,".tif",sep="")
|
||||
lo <- 'layout.fruchterman.reingold'
|
||||
# lo <- 'layout.kamada.kawai'
|
||||
# lo <- 'layout.lgl'
|
||||
d3 <- subset(edgelist,filename==fnm2)
|
||||
d4 <- with(d3,data.frame(node1,node2,rvalue))
|
||||
|
||||
edgelist2<-subset(d4,rvalue > 0.1)
|
||||
edgelist2<-subset(d4,rvalue > rthresh)
|
||||
g <- graph.data.frame(edgelist2, directed=FALSE)
|
||||
fastgreedyCom<-fastgreedy.community(g)
|
||||
V(g)$color <- fastgreedyCom$membership+1
|
||||
E(g)$weight <- runif(ecount(g))
|
||||
E(g)$weight <- E(g)$rvalue
|
||||
E(g)$width <- 1
|
||||
# E(g)[ weight >= 0.3 ]$width <- 2
|
||||
E(g)[ weight >= 0.5 ]$width <- 3
|
||||
quartz();
|
||||
palette(rainbow(max(V(g)$color),alpha=0.5))
|
||||
plot(g, layout=layout.fruchterman.reingold, edge.width=E(g)$width, edge.color="black")
|
||||
palette("default")
|
||||
title('131208_08, fastgreedy, layout.fruchterman.reingold, default vertex size,alpha0.5')
|
||||
E(g)[ weight >= 0.3 ]$width <- 3
|
||||
E(g)[ weight >= 0.5 ]$width <- 5
|
||||
fastgreedyCom<-fastgreedy.community(g,weights=E(g)$weight)
|
||||
V(g)$color <- fastgreedyCom$membership
|
||||
# quartz();
|
||||
# palette(rainbow(max(V(g)$color),alpha=0.5))
|
||||
mypalette <- adjustcolor(brewer.pal(max(V(g)$color),"Set1"),0.6)
|
||||
palette(mypalette)
|
||||
plot(g, layout=eval(parse(text=lo)), edge.width=E(g)$width, edge.color="black", vertex.label.color="black")
|
||||
# palette("default")
|
||||
title(paste(fnm,', fastgreedy default, ', lo, 'r>', rthresh))
|
||||
dateStr=format(Sys.time(),"%y%m%d-%H%M%S")
|
||||
quartz.save(file=paste(dateStr, fnm, ".png",sep=""), type = "png", dpi=150)
|
||||
quartz.save(file=paste(dateStr, fnm, ".pdf",sep=""), type = "pdf")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
g <- graph.ring(10)
|
||||
|
||||