library(tidygraph)
gr <- create_notable('herschel') %>%
mutate(class = sample(letters[1:3], n(), TRUE)) %E>%
mutate(weight = runif(n()))
# Standard graph
autograph(gr)
# Adding node labels will cap edges
autograph(gr, node_label = class)
# Use tidygraph calls for mapping
autograph(gr, node_size = centrality_pagerank())
# Trees are plotted as dendrograms
iris_tree <- hclust(dist(iris[1:4], method = 'euclidean'), method = 'ward.D2')
autograph(iris_tree)
Run the code above in your browser using DataLab