如何更改 Diagrammer 图表上的箭头类型?我想在同一张图上混合它们。
玩具示例:
library(data.table)
niv <- c("A","B","C","D","E","X","Y")
from <- c("A","A","A","A","B","C","D","E", "X", "B")
to <- c("B","C","D","E","X","X","Y","Y","Y", "C")
temp <- data.table(from=factor(from, levels=niv),
to=factor(to,levels=niv), col=c(rep("blue",5), rep("black",5)))
nodes <- create_node_df( n=length(niv), label=niv, width=0.3)
edges <- create_edge_df(from = temp$from, to = temp$to,
rel = "leading_to", label=temp$from, color=temp$col)
graph <- create_graph( nodes_df = nodes, edges_df = edges)
render_graph(graph)
现在所有箭头都定义为 rel = "leading_to"。但我无法在文档中找到我可以使用的其他选项。
我想将该参数链接到我的数据表上的一个新列,指定我想要一个“to”箭头、一个“from”箭头,还是只画一条没有箭头的线。
有尾巴但没有头的箭头有哪些选择?
对于没有箭头的简单线条?