I'm working on a report needs to plot a network using the ggraph package in r. My code is:
net <- graph_from_data_frame(d=edges,vertices=nodes,directed = F)
ggraph(net) +
geom_edge_link(aes(alpha=color)) +
geom_node_point(aes(shape=as.factor(gender),alpha=location))
and I get a plot:, looks like a mushroom :D, is there any way can change the network to another shape?
Try setting the layout, e.g. ggraph(net, layout = 'kk')
.