@@ -36,7 +36,6 @@ if(length(filt.names)==0) stop("Empty list of filtered characters")
3636g.filt <- delete_vertices(g , V(g )$ Filter == " Discard" )
3737
3838# plot settings
39- xlab <- " Number of edges"
4039ylab <- " Largest component size (proportion of vertices)"
4140
4241# compute both types of weights
@@ -46,6 +45,7 @@ wts <- c("Duration","Occurrences")
4645res <- list ()
4746for (wt in wts )
4847{ tlog(2 , " Dealing with " ,wt ," weights" )
48+ xlab <- paste0(" Number of edges, ordered by " ,wt )
4949
5050 # remove each edge iteratively
5151 tlog(4 , " Removing edges iteratively for the unfiltered graph" )
@@ -65,7 +65,7 @@ for(wt in wts)
6565 }
6666 res [[paste0(" Unfiltered-" ,wt )]] <- vals
6767 # plot results
68- plot.file <- get.path.stats.topo(net.type = " static" , mode = " scenes" , meas.name = MEAS_LINKWEIGHT , weights = tolower(wt ), order = " publication " , filtered = " unfiltered" , suf = " evolution_lines " )
68+ plot.file <- get.path.stats.topo(net.type = " static" , mode = " scenes" , meas.name = MEAS_MULTI_GRAPH , weights = tolower(wt ), filtered = " unfiltered" , suf = " giant-comp-size_vs_links " )
6969 tlog(4 , " Plotting in file " ,plot.file )
7070 for (fformat in PLOT_FORMAT )
7171 { if (fformat == PLOT_FORMAT_PDF )
@@ -101,7 +101,7 @@ for(wt in wts)
101101 }
102102 res [[paste0(" Filtered-" ,wt )]] <- vals.filt
103103 # plot result
104- plot.file <- get.path.stats.topo(net.type = " static" , mode = " scenes" , meas.name = MEAS_LINKWEIGHT , weights = tolower(wt ), order = " publication " , filtered = " filtered" , suf = " comp_vs_edges " )
104+ plot.file <- get.path.stats.topo(net.type = " static" , mode = " scenes" , meas.name = MEAS_MULTI_GRAPH , weights = tolower(wt ), filtered = " filtered" , suf = " giant-comp-size_vs_links " )
105105 tlog(4 , " Plotting in file " ,plot.file )
106106 for (fformat in PLOT_FORMAT )
107107 { if (fformat == PLOT_FORMAT_PDF )
@@ -130,8 +130,9 @@ for(wt in wts)
130130tlog(0 , " Plot figures combining unfiltered and filtered nets results" )
131131for (wt in wts )
132132{ tlog(2 , " Dealing with " ,wt ," weights" )
133+ xlab <- paste0(" Number of edges, ordered by " ,wt )
133134
134- plot.file <- get.path.stats.topo(net.type = " static" , mode = " scenes" , meas.name = MEAS_LINKWEIGHT , weights = tolower(wt ), order = " publication " , filtered = " both" , suf = " comp_vs_edges " )
135+ plot.file <- get.path.stats.topo(net.type = " static" , mode = " scenes" , meas.name = MEAS_MULTI_GRAPH , weights = tolower(wt ), filtered = " both" , suf = " giant-comp-size_vs_links " )
135136 tlog(4 , " Plotting in file " ,plot.file )
136137 for (fformat in PLOT_FORMAT )
137138 { if (fformat == PLOT_FORMAT_PDF )
@@ -157,14 +158,15 @@ for(wt in wts)
157158 legend(
158159 title = " Characters" ,
159160 x = " bottomright" ,
160- fill = pal [" Discard" ," Keep" ],
161+ fill = pal [c( " Discard" ," Keep" ) ],
161162 legend = c(" Unfiltered" ," Filtered" )
162163 )
163164 dev.off()
164165 }
165166}
166167
167168# both types of weights in the same figure
169+ xlab <- paste0(" Number of edges ordered by weight" )
168170tlog(0 , " Plot figures combining both types of weights" )
169171for (filtered in c(FALSE ,TRUE ))
170172{ if (filtered )
@@ -183,7 +185,7 @@ for(filtered in c(FALSE,TRUE))
183185 }
184186 tlog(2 , " Dealing with the " ,tolower(fn )," network" )
185187
186- plot.file <- get.path.stats.topo(net.type = " static" , mode = " scenes" , meas.name = MEAS_LINKWEIGHT , weights = " both" , order = " publication " , filtered = filt.txt , suf = " comp_vs_edges " )
188+ plot.file <- get.path.stats.topo(net.type = " static" , mode = " scenes" , meas.name = MEAS_MULTI_GRAPH , weights = " both" , filtered = filt.txt , suf = " giant-comp-size_vs_links " )
187189 tlog(4 , " Plotting in file " ,plot.file )
188190 for (fformat in PLOT_FORMAT )
189191 { if (fformat == PLOT_FORMAT_PDF )
@@ -218,7 +220,8 @@ for(filtered in c(FALSE,TRUE))
218220}
219221
220222# all in the same figure
221- plot.file <- get.path.stats.topo(net.type = " static" , mode = " scenes" , meas.name = MEAS_LINKWEIGHT , weights = " both" , order = " publication" , filtered = " both" , suf = " comp_vs_edges" )
223+ plot.file <- get.path.stats.topo(net.type = " static" , mode = " scenes" , meas.name = MEAS_MULTI_GRAPH , weights = " both" , filtered = " both" , suf = " giant-comp-size_vs_links" )
224+ xlab <- paste0(" Number of edges ordered by weight" )
222225tlog(0 , " Plot everything in the same file " ,plot.file )
223226for (fformat in PLOT_FORMAT )
224227{ if (fformat == PLOT_FORMAT_PDF )
@@ -257,7 +260,7 @@ for(fformat in PLOT_FORMAT)
257260 legend(
258261 title = " Characters" ,
259262 x = " topleft" ,
260- fill = pal [" Discard" ," Keep" ],
263+ fill = pal [c( " Discard" ," Keep" ) ],
261264 legend = c(" Unfiltered" ," Filtered" )
262265 )
263266 legend(
0 commit comments