【发布时间】:2015-06-08 22:55:14
【问题描述】:
G = DiGraph(A, format='weighted_adjacency_matrix')
G.relabel([1..10],inplace=True)
H = G.plot(edge_labels=False, graph_border=True)
H.show()
是否可以通过此图表突出显示某条路线?即使某些线条具有不同的颜色,例如红色?
【问题讨论】:
G = DiGraph(A, format='weighted_adjacency_matrix')
G.relabel([1..10],inplace=True)
H = G.plot(edge_labels=False, graph_border=True)
H.show()
是否可以通过此图表突出显示某条路线?即使某些线条具有不同的颜色,例如红色?
【问题讨论】:
这就是你要找的吗?
sage: g = graphs.PetersenGraph()
sage: g.show(edge_colors={'red':[(0,1),(1,6),(6,9),(9,4)] })
可在此页面上找到所有可用图表选项的文档:
http://www.sagemath.org/doc/reference/plotting/sage/graphs/graph_plot.html
内森
【讨论】: