网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

Mathematica基础——GraphPlot

时间:2024-10-15 10:43:40

1、比如下图,虽然代码里面显示,图应该是有向图,但结果却没有明确指定方向:GraphPlot[{1 -> 2, 2 -> 1, 3 -> 1, 3 -> 2, 8 -> 1, 8 -> 2, 8 -> 8}]

Mathematica基础——GraphPlot

3、如果需要写出各顶点的标签,需要用VertexLabeling -> True来限制:GraphPlot[{1 -> 2, 2 幻腾寂埒-> 1, 3 -> 1, 3 -> 2, 8 -> 1, 8 -> 2, 8 -> 8}, DirectedEdges -> True, VertexLabeling -> True]VertexLabeling的意思是,标注顶点。

Mathematica基础——GraphPlot

5、Mathematica可以轻松地绘制出一个36阶的完全图,感觉有点密集:GraphPlot[Table[1, {20}, {20}]]

Mathematica基础——GraphPlot
© 2025 五度知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com