@@ -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
0 commit comments