向链接多个节点的边添加边属性

问题描述

我有一个图表如下 -

# dput output 

g <- structure(list(29,TRUE,c(0,1,2,3,4,5,6,0),c(7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,25),7,31,29,30,27),26),32,32),list(c(1,1),structure(list(),.Names = character(0)),list(name = c("W","C","S","LM","F","R","V","6492","6927","7689","7426","6251","6924","6386","5195","7984","7267","7877","7615","6768","7814","6648","4943","7532","8498","8188","6789","6270","4896"
        ),type = c(1,0)),list()),<environment>),class = "igraph")

# and plot 

ggraph(g,layout='nicely')+geom_edge_link()+geom_node_point(aes(fill = as.factor(V(ep_loc_2016)$type)),shape=21,stroke=1)+theme(legend.position="none")

enter image description here

我现在想更改线型以反映两组红色节点 - 其中红色节点连接到 >1 个蓝色节点 = 虚线,红色节点连接到单个蓝色节点 = 实线。

欢迎 ggraph 中的任何想法。 谢谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)