Skip to content

Commit 562afb9

Browse files
committed
Adding figures
1 parent c7c25c1 commit 562afb9

12 files changed

+27
-8
lines changed

README.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ out <- plot_infectsuscep(diffnet, bins = 20,K=5, logscale = FALSE, exclude.zeros
104104

105105
### Threshold
106106

107-
```{r, plot_threshold, fig.height=7}
107+
```{r BoringThreshold, plot_threshold, fig.height=7}
108108
# Generating a random graph
109109
set.seed(123)
110110
diffnet <- rdiffnet(500, 20,
@@ -120,7 +120,7 @@ plot_threshold(diffnet, vertex.cex = "degree")
120120

121121
Using more features
122122

123-
```{r}
123+
```{r NiceThreshold}
124124
data("medInnovationsDiffNet")
125125
size <- sqrt(1 + dgr(medInnovationsDiffNet)[,1])
126126
set.seed(131)
@@ -138,14 +138,14 @@ plot_threshold(
138138

139139
### Adoption rate
140140

141-
```{r}
141+
```{r Adopters}
142142
plot_adopters(diffnet)
143143
```
144144

145145

146146
### Hazard rate
147147

148-
```{r}
148+
```{r Hazard}
149149
hazard_rate(diffnet)
150150
```
151151

README.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,29 +163,48 @@ diffnet
163163
plot_threshold(diffnet, vertex.cex = .25)
164164
```
165165

166-
![](README_files/figure-markdown_github/plot_threshold-1.png)<!-- -->
166+
![](README_files/figure-markdown_github/BoringThreshold,%20plot_threshold-1.png)<!-- -->
167167

168168
``` r
169169
plot_threshold(diffnet, vertex.cex = "degree")
170170
```
171171

172-
![](README_files/figure-markdown_github/plot_threshold-2.png)<!-- -->
172+
![](README_files/figure-markdown_github/BoringThreshold,%20plot_threshold-2.png)<!-- -->
173+
174+
Using more features
175+
176+
``` r
177+
data("medInnovationsDiffNet")
178+
size <- sqrt(1 + dgr(medInnovationsDiffNet)[,1])
179+
set.seed(131)
180+
plot_threshold(
181+
medInnovationsDiffNet,
182+
vertex.label = nodes(medInnovationsDiffNet),
183+
vertex.cex = size/10, vertex.lab.pos = NULL,
184+
vertex.lab.cex = size/4,
185+
vertex.sides = medInnovationsDiffNet[["city"]] + 2,
186+
sub = "Note: Vertices' sizes and shapes given by degree and city respectively",
187+
jitter.factor = c(1,1), jitter.amount = c(.25,.025)
188+
)
189+
```
190+
191+
![](README_files/figure-markdown_github/NiceThreshold-1.png)<!-- -->
173192

174193
### Adoption rate
175194

176195
``` r
177196
plot_adopters(diffnet)
178197
```
179198

180-
![](README_files/figure-markdown_github/unnamed-chunk-2-1.png)<!-- -->
199+
![](README_files/figure-markdown_github/Adopters-1.png)<!-- -->
181200

182201
### Hazard rate
183202

184203
``` r
185204
hazard_rate(diffnet)
186205
```
187206

188-
![](README_files/figure-markdown_github/unnamed-chunk-3-1.png)<!-- -->
207+
![](README_files/figure-markdown_github/Hazard-1.png)<!-- -->
189208

190209
### Diffusion process
191210

33.2 KB
Loading
166 KB
Loading
156 KB
Loading
21.8 KB
Loading
112 KB
Loading
-1.15 KB
Loading
-136 Bytes
Loading
-76 Bytes
Loading

0 commit comments

Comments
 (0)