Skip to content

Commit 36005ca

Browse files
committed
adjusted robustness script
1 parent 498f6e2 commit 36005ca

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/post/description/_all_post.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ source("src/post/description/diameters.R")
2525
source("src/post/description/nei_vs_deg.R")
2626
source("src/post/description/partial_extr.R")
2727
source("src/post/description/pref_attach.R")
28-
#source("src/post/description/robustness.R")
28+
source("src/post/description/robustness.R")
2929
#source("src/post/description/sex_stats.R")
3030
#source("src/post/description/trans_vs_deg.R")
3131
#source("src/post/description/weight_plots.R")

src/post/description/robustness.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ tlog.end.loop(0,"Loop over measures is complete")
104104
meass <- c(MEAS_DEGREE, MEAS_BETWEENNESS, "random")
105105

106106
# file and common parameters
107-
plot.file <- get.path.stats.topo(net.type="static", mode="scenes", meas.name=MEAS_MULTI_GRAPH, filtered="both", suf=paste0("giant.comp.size_vs_",meas))
107+
plot.file <- get.path.stats.topo(net.type="static", mode="scenes", meas.name=MEAS_MULTI_GRAPH, filtered="both", suf=paste0("giant-comp-size_vs_centrality"))
108108
tlog(4, "Plotting in file ",plot.file)
109109
xlab <- "Proportion of vertices removed"
110110
pal <- ATT_COLORS_FILT[c("Discard","Keep")]
@@ -136,9 +136,9 @@ for(fformat in PLOT_FORMAT)
136136
pal["Discard"],
137137
combine.colors(col1=pal["Discard"], col2="BLACK", transparency=65)
138138
)
139-
for(s in 1:length(ys))
139+
for(s in 1:length(meass))
140140
{ points(
141-
x=1:gorder(g.unf)/gorder(g.unf), y=ys[[s]][["FALSE"]]/gorder(g.unf),
141+
x=1:gorder(g.unf)/gorder(g.unf), y=ys[[meass[s]]][["FALSE"]]/gorder(g.unf),
142142
col=cols[s],
143143
pch=s-1
144144
# http://www.sthda.com/english/wiki/r-plot-pch-symbols-the-different-point-shapes-available-in-r
@@ -147,7 +147,7 @@ for(fformat in PLOT_FORMAT)
147147

148148
# add filtered results
149149
par(
150-
fig=c(0.42, 0.97, 0.42, 0.97),
150+
fig=c(0.43, 0.97, 0.43, 0.97),
151151
new=TRUE,
152152
mgp=c(1.5,0.5,0)
153153
)
@@ -166,9 +166,9 @@ for(fformat in PLOT_FORMAT)
166166
pal["Keep"],
167167
combine.colors(col1=pal["Keep"], col2="BLACK", transparency=65)
168168
)
169-
for(s in 1:length(ys))
169+
for(s in 1:length(meass))
170170
{ points(
171-
x=1:gorder(g.flt)/gorder(g.flt), y=ys[[s]][["TRUE"]]/gorder(g.flt),
171+
x=1:gorder(g.flt)/gorder(g.flt), y=ys[[meass[s]]][["TRUE"]]/gorder(g.flt),
172172
col=cols[s],
173173
pch=s-1,
174174
cex.lab=0.75, cex.axis=0.75, cex=0.75

0 commit comments

Comments
 (0)