Skip to content

Commit e01b312

Browse files
committed
Minor fixes
1 parent 1ddef04 commit e01b312

File tree

3 files changed

+58
-88
lines changed

3 files changed

+58
-88
lines changed

R/Graph.plots.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ plot.graph <- function(
2525
add_legend(graph$graph, vertex_color, edge_color) +
2626
ggplot2::theme_void() +
2727
ggplot2::theme(
28-
plot.margin = ggplot2::margin(t = 0, r = 100, b = 0, l = 0)
28+
plot.margin = ggplot2::margin(t = 0, r = 0, b = 0, l = 0)
2929
) +
3030
ggplot2::coord_cartesian(clip = "off")
3131
}
@@ -189,15 +189,15 @@ set_vertex_color.igraph <- function(graph, vertex_color = NULL, custom_palette =
189189
if (is.null(custom_palette)) {
190190
pal <- get_palette.igraph(graph, vertex_attr = vertex_color, alpha = 0.8)
191191
vertex_colors <- pal[as.character(vertex_vals)]
192-
vertex_colors[is.na(vertex_colors)] <- "gray"
192+
vertex_colors[is.na(vertex_colors)] <- grDevices::adjustcolor("gray", alpha.f = 0.2)
193193
} else {
194194
pal <- unlist(custom_palette)
195195
vertex_colors <- pal[as.character(vertex_vals)]
196-
vertex_colors[is.na(vertex_colors)] <- "gray"
196+
vertex_colors[is.na(vertex_colors)] <- grDevices::adjustcolor("gray", alpha.f = 0.2)
197197
}
198198
}
199199
} else {
200-
vertex_colors <- rep("gray", igraph::vcount(graph))
200+
vertex_colors <- rep(grDevices::adjustcolor("gray", alpha.f = 0.2), igraph::vcount(graph))
201201
vertex_names <- rep("", igraph::vcount(graph))
202202
}
203203
igraph::V(graph)$color <- vertex_colors

inst/Templates/Report_template.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ for (key in names(metadata)) {
3535
```
3636
Input data: `r paste0(config$input_name, ".csv")`
3737

38-
Date range: `r network$from_year` to `r network$to_year`
38+
Date range: `r config$from_year` to `r config$to_year`
3939

4040
`r metadata_text`
4141

0 commit comments

Comments
 (0)