This function sets up graphical options for igraph objects. Existing options include:

vimes_graph_opt(...)

Arguments

...
a list of named graphical options; see Description.

Details

  • col_pal a color palette used for the groups; defaults to vimes_pal1

  • layout a layout function used for plotting the graph; see ?layout_nicely for more information.

  • seed a random seed to be used for plotting the graph

  • vertex_size the size of the vertices; defaults to 10

  • label_family a font family for labels; defaults to "sans"

  • label_color the color of the labels; defaults to "black"

  • edge_label a logical indicating if weights should be used to annotate the edges; defaults to FALSE

Examples

vimes_graph_opt()
#> $col_pal #> function (n) #> { #> colors <- c("#ccddff", "#79d2a6", "#ffb3b3", "#a4a4c1", "#ffcc00", #> "#ff9f80", "#ccff99", "#df9fbf", "#ffcc99", "#cdcdcd") #> if (n < length(colors)) { #> return(colors[seq_len(n)]) #> } #> else { #> return(colorRampPalette(colors)(n)) #> } #> } #> <environment: namespace:vimes> #> #> $layout #> function (graph, dim = 2, ...) #> { #> if ("layout" %in% graph_attr_names(graph)) { #> lay <- graph_attr(graph, "layout") #> if (is.function(lay)) { #> lay(graph, ...) #> } #> else { #> lay #> } #> } #> else if (all(c("x", "y") %in% vertex_attr_names(graph))) { #> if ("z" %in% vertex_attr_names(graph)) { #> cbind(V(graph)$x, V(graph)$y, V(graph)$z) #> } #> else { #> cbind(V(graph)$x, V(graph)$y) #> } #> } #> else if (vcount(graph) < 1000) { #> layout_with_fr(graph, dim = dim, ...) #> } #> else { #> layout_with_drl(graph, dim = dim, ...) #> } #> } #> <environment: namespace:igraph> #> #> $seed #> [1] 1 #> #> $vertex_size #> [1] 10 #> #> $label_family #> [1] "sans" #> #> $label_color #> [1] "black" #> #> $edge_label #> [1] FALSE #>