如何更改 Diagrammer 图表上边缘标签的颜色?
玩具示例:
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)
知道如何自动避免边缘标签与边缘重叠也会很好吗?目前我必须用 Inkscape 编辑结果。