1
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 = DiGraph(A, format='weighted_adjacency_matrix')
G.relabel([1..10],inplace=True)
H = G.plot(edge_labels=False, graph_border=True)
H.show()
是否可以通过此图表突出显示某条路线?即让一些线条变成不同的颜色,比如红色?使用Sage的图形
这是你在找什么?
http://www.sagemath.org/doc/reference/plotting/sage/graphs/graph_plot.html
Nathann
:sage: g = graphs.PetersenGraph()
sage: g.show(edge_colors={'red':[(0,1),(1,6),(6,9),(9,4)] })
的用于图形绘制所有可用选项的文档可以在此页面上找到