@@ -88,10 +88,10 @@ el <- get.edgelist(g.filtr, names=FALSE)
8888ww <- rep(1 , gsize(g.filtr ))
8989# ww <- E(cmp)$weight
9090lay.filtr <<- qgraph.layout.fruchtermanreingold( # actually not used anymore
91- edgelist = el ,
92- vcount = gorder(g.filtr ),
93- weight = ww ,
94- area = 10 * (gorder(g.filtr )^ 2 ),repulse.rad = (gorder(g.filtr )^ 3.0 )
91+ edgelist = el ,
92+ vcount = gorder(g.filtr ),
93+ weight = ww ,
94+ area = 10 * (gorder(g.filtr )^ 2 ),repulse.rad = (gorder(g.filtr )^ 3.0 )
9595)
9696
9797# get filtered edges
@@ -113,7 +113,6 @@ diam.paths <- lapply(1:nrow(idx), function(r) all_shortest_paths(graph=g.filtr,
113113
114114# plot diameters
115115tlog(0 ," Plotting diameter paths" )
116- base.file <- get.path.data.graph(mode = " scenes" , net.type = " static" , filtered = TRUE , subfold = " diameters" , pref = " graph" , suf = " _diameter" )
117116for (pp in 1 : length(diam.paths ))
118117{ tlog(2 ," Processing vertex pair " ,pp ," /" ,length(diam.paths ))
119118 if (pp == 1 )
@@ -123,28 +122,28 @@ for(pp in 1:length(diam.paths))
123122
124123 q <- 1
125124 for (p in s : length(diam.paths [[pp ]]))
126- { # plot absolutely all diameters on the same graph
125+ { # draw absolutely all diameters on the same plot
127126 if (p == - 1 )
128127 { tlog(4 ," Plotting all diameters on the same graph" )
129128 paths <- unlist(diam.paths , recursive = FALSE )
130- graph .file <- paste0( base.file , " s " )
131- tlog(6 ," Producing file " ,graph .file )
129+ plot .file <- get.path.data.graph( mode = " scenes " , net.type = " static " , filtered = TRUE , subfold = " diameters " , pref = " graph " , suf = " all_diameters " )
130+ tlog(6 ," Producing file " ,plot .file )
132131
133132 }
134- # plot all diameter variants on the same graph
133+ # draw all diameter variants on the same plot
135134 else if (p == 0 )
136135 { tlog(4 ," Plotting all diameter variants at once" )
137136 paths <- diam.paths [[pp ]]
138- graph .file <- paste0( base. file, " _ " ,pp )
139- tlog(6 ," Producing file " ,graph .file )
137+ plot .file <- get.path.data.graph( mode = " scenes " , net.type = " static " , filtered = TRUE , subfold = file.path( " diameters " ,paste0( " nodepair_ " ,pp )), pref = " graph " , suf = paste0( " diameter_ " , pp ) )
138+ tlog(6 ," Producing file " ,plot .file )
140139 }
141- # plot each diameter variant separately
140+ # draw each diameter variant separately
142141 else
143142 { tlog(4 ," Plotting diameter variant " ,p ," /" ,length(diam.paths [[pp ]]))
144143 if (p == 1 || ! all(diam.paths [[pp ]][[p ]]== diam.paths [[pp ]][[p - 1 ]]))
145144 { paths <- diam.paths [[pp ]][[p ]]
146- graph .file <- paste0( base. file, " _ " ,pp , " _" ,q )
147- tlog(6 ," Producing file " ,graph .file )
145+ plot .file <- get.path.data.graph( mode = " scenes " , net.type = " static " , filtered = TRUE , subfold = file.path( " diameters " ,paste0( " nodepair_ " ,pp )), pref = " graph " , suf = paste0( " diameter_ " , pp , " _" ,q ) )
146+ tlog(6 ," Producing file " ,plot .file )
148147 q <- q + 1
149148 }
150149 else
@@ -172,9 +171,9 @@ for(pp in 1:length(diam.paths))
172171 tlog(6 ," Plotting all paths at once for vertex pair #" ,pp )
173172 for (fformat in PLOT_FORMAT )
174173 { if (fformat == PLOT_FORMAT_PDF )
175- pdf(file = paste0(graph .file ,PLOT_FORMAT_PDF ), bg = " white" , width = 40 , height = 40 )
174+ pdf(file = paste0(plot .file ,PLOT_FORMAT_PDF ), bg = " white" , width = 40 , height = 40 )
176175 else if (fformat == PLOT_FORMAT_PNG )
177- png(filename = paste0(graph .file ,PLOT_FORMAT_PNG ), width = 2000 , height = 2000 , units = " px" , pointsize = 20 , bg = " white" )
176+ png(filename = paste0(plot .file ,PLOT_FORMAT_PNG ), width = 2000 , height = 2000 , units = " px" , pointsize = 20 , bg = " white" )
178177 plot(g.filtr2 ,
179178 layout = LAYOUT [idx.keep ,], # lay.filtr
180179# vertex.size=vsizes[idx.keep], vertex.color=vcols[idx.keep],
0 commit comments