Graph3D
✖
Graph3D
更多信息和选项


- Graph3D 生成 Graph 对象并在笔记本中将其显示为三维图形.
- Graph3D 和 Graph 支持同样的顶点,边以及封装.
- Graph3D 和 Graphics3D 有着相同的选项,并有如下增加和修改: [所有选项的列表]
-
AnnotationRules {} 图形、边和顶点的注释 Boxed False 是否绘制边界框的边缘 DirectedEdges Automatic 是否把 Rule 解释为 DirectedEdge EdgeLabels Automatic 边的标签及标签位置 EdgeLabelStyle Automatic 用于边标签的样式 EdgeShapeFunction Automatic 生成边的图形形状 EdgeStyle Automatic 边的样式 EdgeWeight Automatic 边的权重 GraphHighlight {} 高亮的图元素 GraphHighlightStyle Automatic 高亮的样式 GraphLayout Automatic 如何排布顶点和边 PerformanceGoal Automatic 试图优化性能的某方面 PlotTheme Automatic 图元素的总体样式 VertexCoordinates Automatic 顶点的坐标 VertexLabels Automatic 顶点的标签及标签位置 VertexLabelStyle Automatic 用于顶点标签的样式 VertexShape Automatic 顶点的图形形状 VertexShapeFunction Automatic 生成顶点的图形形状 VertexSize Medium 顶点的大小 VertexStyle Automatic 顶点的样式 VertexWeight Automatic 顶点的权重
所有选项的列表




范例
打开所有单元关闭所有单元基本范例 (5)常见实例总结

https://wolfram.com/xid/0ftwm3s-uvltx1


https://wolfram.com/xid/0ftwm3s-hf93jr


https://wolfram.com/xid/0ftwm3s-gw3h3


https://wolfram.com/xid/0ftwm3s-rzwlwe


https://wolfram.com/xid/0ftwm3s-hv0ahm

范围 (26)标准用法实例范围调查
连通性 (8)

https://wolfram.com/xid/0ftwm3s-eyabqs


https://wolfram.com/xid/0ftwm3s-h2znzh


https://wolfram.com/xid/0ftwm3s-t8xwn


https://wolfram.com/xid/0ftwm3s-dwwk49


https://wolfram.com/xid/0ftwm3s-k9py0p

用 VertexList 和 EdgeList 得到顶点和边:

https://wolfram.com/xid/0ftwm3s-z3ycv


https://wolfram.com/xid/0ftwm3s-c60esi


https://wolfram.com/xid/0ftwm3s-cs08co

使用显式的顶点列表来控制 VertexList 中显示的顺序:

https://wolfram.com/xid/0ftwm3s-cwwd2i


https://wolfram.com/xid/0ftwm3s-edo3i


https://wolfram.com/xid/0ftwm3s-f0htkx


https://wolfram.com/xid/0ftwm3s-rjpj4


https://wolfram.com/xid/0ftwm3s-hbyn4

封装 (5)

https://wolfram.com/xid/0ftwm3s-kbcj08


https://wolfram.com/xid/0ftwm3s-feveim

添加交互行为,用像 Tooltip 这样的封装:

https://wolfram.com/xid/0ftwm3s-beo9z4


https://wolfram.com/xid/0ftwm3s-c1h5pq

用 Button 来触发点击边或顶点时的行为:

https://wolfram.com/xid/0ftwm3s-dj01ba

用 PopupWindow 提供明细信息:

https://wolfram.com/xid/0ftwm3s-dlyjei

样式 (7)

https://wolfram.com/xid/0ftwm3s-diq4w


https://wolfram.com/xid/0ftwm3s-jcmo8i


https://wolfram.com/xid/0ftwm3s-fumdv


https://wolfram.com/xid/0ftwm3s-kij569


https://wolfram.com/xid/0ftwm3s-du6sqj

使用内建的各种可用作 VertexShapeFunction 的函数:

https://wolfram.com/xid/0ftwm3s-bb9hnx


https://wolfram.com/xid/0ftwm3s-lsz53w


https://wolfram.com/xid/0ftwm3s-b93ytj


https://wolfram.com/xid/0ftwm3s-ii55nz


https://wolfram.com/xid/0ftwm3s-6gmd9

使用内建的可用作 EdgeShapeFunction 的函数:

https://wolfram.com/xid/0ftwm3s-bj0g84


https://wolfram.com/xid/0ftwm3s-fgaaox


https://wolfram.com/xid/0ftwm3s-f8ssfa


https://wolfram.com/xid/0ftwm3s-7y9i


https://wolfram.com/xid/0ftwm3s-927k


https://wolfram.com/xid/0ftwm3s-bdu58p

标签 (6)

https://wolfram.com/xid/0ftwm3s-f0bgo9


https://wolfram.com/xid/0ftwm3s-jhpekb


https://wolfram.com/xid/0ftwm3s-gyhwgx

用 Placed 控制顶点标签的位置,包括在位置上方的符号:

https://wolfram.com/xid/0ftwm3s-kj7c6


https://wolfram.com/xid/0ftwm3s-jzlpy


https://wolfram.com/xid/0ftwm3s-dwxanf

用封装中的 Placed 放置多个标签:

https://wolfram.com/xid/0ftwm3s-jm7jll


https://wolfram.com/xid/0ftwm3s-g4ik4

用 VertexLabels 放置多个标签:

https://wolfram.com/xid/0ftwm3s-gqucwy

用带符号形式位置说明的 Placed 控制标签沿着边的位置:

https://wolfram.com/xid/0ftwm3s-e0qhjl


https://wolfram.com/xid/0ftwm3s-nd0sz

用封装中的 Placed 放置多个标签:

https://wolfram.com/xid/0ftwm3s-yygoa


https://wolfram.com/xid/0ftwm3s-bhs5vp

用 EdgeLabels 放置多个标签:

https://wolfram.com/xid/0ftwm3s-dyhc8j

选项 (74)各选项的常用值和功能
AnnotationRules (2)
DirectedEdges (2)

https://wolfram.com/xid/0ftwm3s-iwq8nh

用 DirectedEdges->False 把规则解释为无向边:

https://wolfram.com/xid/0ftwm3s-hsbm48

用 DirectedEdge 或 UndirectedEdge 直接指定一个图是有向的还是无向的:

https://wolfram.com/xid/0ftwm3s-c4p2v7

EdgeLabels (7)

https://wolfram.com/xid/0ftwm3s-z5279


https://wolfram.com/xid/0ftwm3s-1t3zd

https://wolfram.com/xid/0ftwm3s-hr4015


https://wolfram.com/xid/0ftwm3s-b7zkda

用带符号位置说明的 Placed 控制沿着边的标签位置:

https://wolfram.com/xid/0ftwm3s-fnltmw


https://wolfram.com/xid/0ftwm3s-hjrtm9

https://wolfram.com/xid/0ftwm3s-x5pt5


https://wolfram.com/xid/0ftwm3s-b1ici5

https://wolfram.com/xid/0ftwm3s-o5eoy


https://wolfram.com/xid/0ftwm3s-ndfa94


https://wolfram.com/xid/0ftwm3s-bg84f5

用封装内的 Placed 放置多个标签:

https://wolfram.com/xid/0ftwm3s-cj2dt


https://wolfram.com/xid/0ftwm3s-dy5run

用 EdgeLabels 放置多个标签:

https://wolfram.com/xid/0ftwm3s-33q72

用从 Tooltip 到 StatusArea 的值自动对边进行标记:

https://wolfram.com/xid/0ftwm3s-dhn5kr


https://wolfram.com/xid/0ftwm3s-bd54a9

EdgeShapeFunction (6)
得到 EdgeShapeFunction 的内建设置列表:

https://wolfram.com/xid/0ftwm3s-ffqym9


https://wolfram.com/xid/0ftwm3s-llvpq5


https://wolfram.com/xid/0ftwm3s-kxwdrp


https://wolfram.com/xid/0ftwm3s-4c8ju8


https://wolfram.com/xid/0ftwm3s-oph3q


https://wolfram.com/xid/0ftwm3s-dhuyox


https://wolfram.com/xid/0ftwm3s-b98if4


https://wolfram.com/xid/0ftwm3s-gvl95s


https://wolfram.com/xid/0ftwm3s-b7q813

https://wolfram.com/xid/0ftwm3s-lpe237

EdgeShapeFunction 可以和 EdgeStyle 结合使用:

https://wolfram.com/xid/0ftwm3s-njyp0e

EdgeShapeFunction 有比 EdgeStyle 更高的权限:

https://wolfram.com/xid/0ftwm3s-inu440

EdgeStyle (4)

https://wolfram.com/xid/0ftwm3s-dx7dg5


https://wolfram.com/xid/0ftwm3s-ffvp7v

EdgeStyle 可以和 EdgeShapeFunction 结合使用:

https://wolfram.com/xid/0ftwm3s-byw1p6

https://wolfram.com/xid/0ftwm3s-gltig7

EdgeShapeFunction 有比 EdgeStyle 更高的权限:

https://wolfram.com/xid/0ftwm3s-f7ohq3

https://wolfram.com/xid/0ftwm3s-kw06wx


https://wolfram.com/xid/0ftwm3s-mwzwu


https://wolfram.com/xid/0ftwm3s-ovk4z6

EdgeWeight (2)
GraphLayout (5)

https://wolfram.com/xid/0ftwm3s-dcwliv


https://wolfram.com/xid/0ftwm3s-6jr99


https://wolfram.com/xid/0ftwm3s-jstixv

https://wolfram.com/xid/0ftwm3s-cjr2sf

VertexCoordinates 会覆盖 GraphLayout 的坐标:

https://wolfram.com/xid/0ftwm3s-kmmsdp

用 AbsoluteOptions 获得用布局算法计算的 VertexCoordinates:

https://wolfram.com/xid/0ftwm3s-gbw20j


https://wolfram.com/xid/0ftwm3s-ee38ye

GraphHighlight (3)
PlotTheme (4)
VertexCoordinates (3)

https://wolfram.com/xid/0ftwm3s-5spor

可以用 AbsoluteOptions 获得计算得到的顶点坐标:

https://wolfram.com/xid/0ftwm3s-2whoh


https://wolfram.com/xid/0ftwm3s-mwyuvu

https://wolfram.com/xid/0ftwm3s-cvx31k


https://wolfram.com/xid/0ftwm3s-uukkr

VertexCoordinates 的优先级比 GraphLayout 要高:

https://wolfram.com/xid/0ftwm3s-hdij4u

VertexLabels (13)

https://wolfram.com/xid/0ftwm3s-c9ka50


https://wolfram.com/xid/0ftwm3s-i40mcj


https://wolfram.com/xid/0ftwm3s-whkpg


https://wolfram.com/xid/0ftwm3s-kokbex

使用带有符号位置的 Placed 来控制标签位置,包括在位置之外:

https://wolfram.com/xid/0ftwm3s-csc6y


https://wolfram.com/xid/0ftwm3s-405x2

https://wolfram.com/xid/0ftwm3s-fjgxt8


https://wolfram.com/xid/0ftwm3s-fg0pin


https://wolfram.com/xid/0ftwm3s-kfrv7

https://wolfram.com/xid/0ftwm3s-dr87wv


https://wolfram.com/xid/0ftwm3s-cqfi4r


https://wolfram.com/xid/0ftwm3s-20sv

用封装中的 Placed 放置多个标签:

https://wolfram.com/xid/0ftwm3s-eazh7z


https://wolfram.com/xid/0ftwm3s-ftgvi6

用 VertexLabels 放置多个标签:

https://wolfram.com/xid/0ftwm3s-kusfg3

使用 Placed 的参数来控制包括 Tooltip 在内的格式化:

https://wolfram.com/xid/0ftwm3s-cxzeiw

或 StatusArea:

https://wolfram.com/xid/0ftwm3s-nddwmk


https://wolfram.com/xid/0ftwm3s-bd9m40

https://wolfram.com/xid/0ftwm3s-cggp96


https://wolfram.com/xid/0ftwm3s-l3s7yb

https://wolfram.com/xid/0ftwm3s-cljxny


https://wolfram.com/xid/0ftwm3s-cqkdbb

https://wolfram.com/xid/0ftwm3s-bjoam1

VertexShapeFunction (10)
获得内建的可用作 VertexShapeFunction 函数的列表:

https://wolfram.com/xid/0ftwm3s-cc7w4d

使用在 "Basic" 集中的 VertexShapeFunction 内建设置:

https://wolfram.com/xid/0ftwm3s-kqz1mq


https://wolfram.com/xid/0ftwm3s-20nhrf


https://wolfram.com/xid/0ftwm3s-wm2s7

使用在 "Rounded" 集中的 VertexShapeFunction 内建设置:

https://wolfram.com/xid/0ftwm3s-cpul4b


https://wolfram.com/xid/0ftwm3s-cj5ftp

使用在 "Concave" 集中的 VertexShapeFunction 内建设置:

https://wolfram.com/xid/0ftwm3s-f4ea1p


https://wolfram.com/xid/0ftwm3s-bfhgv4


https://wolfram.com/xid/0ftwm3s-fhb0zi


https://wolfram.com/xid/0ftwm3s-fmawhn


https://wolfram.com/xid/0ftwm3s-oroxkx

https://wolfram.com/xid/0ftwm3s-lt54lp

VertexShapeFunction 可以和 VertexStyle 结合使用:

https://wolfram.com/xid/0ftwm3s-djz15m

VertexShapeFunction 比 VertexStyle 优先级要高:

https://wolfram.com/xid/0ftwm3s-h9wrh2

https://wolfram.com/xid/0ftwm3s-ir0ry

VertexShapeFunction 可以和 VertexSize 结合使用:

https://wolfram.com/xid/0ftwm3s-e414xo

VertexShapeFunction 比 VertexShape 优先级要高:

https://wolfram.com/xid/0ftwm3s-lnnzsy

VertexSize (7)

https://wolfram.com/xid/0ftwm3s-dsy1ve


https://wolfram.com/xid/0ftwm3s-lskxsr


https://wolfram.com/xid/0ftwm3s-3lxk1


https://wolfram.com/xid/0ftwm3s-my5omo


https://wolfram.com/xid/0ftwm3s-c7twgs


https://wolfram.com/xid/0ftwm3s-h6r4ja

VertexSize 可以和 VertexShapeFunction 结合使用:

https://wolfram.com/xid/0ftwm3s-b3jw4t

VertexStyle (4)

https://wolfram.com/xid/0ftwm3s-ehbi7i


https://wolfram.com/xid/0ftwm3s-dtkst6

VertexShapeFunction 可以和 VertexStyle 结合使用:

https://wolfram.com/xid/0ftwm3s-om30z

https://wolfram.com/xid/0ftwm3s-nnfnwx

VertexShapeFunction 比 VertexStyle 的优先级要高:

https://wolfram.com/xid/0ftwm3s-kfv4n

https://wolfram.com/xid/0ftwm3s-cldcke

VertexStyle 可以和 BaseStyle 结合使用:

https://wolfram.com/xid/0ftwm3s-bby1h9

VertexStyle 比 BaseStyle 的优先级要高:

https://wolfram.com/xid/0ftwm3s-d0df6

应用 (4)用该函数可以解决的问题范例

https://wolfram.com/xid/0ftwm3s-ce4s04


https://wolfram.com/xid/0ftwm3s-dyfscx

使用 Table 为多项内容设定相似的注释:

https://wolfram.com/xid/0ftwm3s-vz4i6n


https://wolfram.com/xid/0ftwm3s-fk2q8

https://wolfram.com/xid/0ftwm3s-jeav5e

https://wolfram.com/xid/0ftwm3s-gunl5z

属性和关系 (3)函数的属性及与其他函数的关联
用 VertexCount 和 EdgeCount 数出顶点和边的数量:

https://wolfram.com/xid/0ftwm3s-ewldet


https://wolfram.com/xid/0ftwm3s-buy2ca

用 VertexList 和 EdgeList 按标准顺序枚举顶点和边:

https://wolfram.com/xid/0ftwm3s-l0u8q

https://wolfram.com/xid/0ftwm3s-l06m


https://wolfram.com/xid/0ftwm3s-chydq0

https://wolfram.com/xid/0ftwm3s-f3ry1t


https://wolfram.com/xid/0ftwm3s-ctjma3

https://wolfram.com/xid/0ftwm3s-tgvla

从图计算邻接矩阵 AdjacencyMatrix:

https://wolfram.com/xid/0ftwm3s-bil8h7

https://wolfram.com/xid/0ftwm3s-cewi3i

行列顺序由 VertexList 给出:

https://wolfram.com/xid/0ftwm3s-j52iu2


https://wolfram.com/xid/0ftwm3s-no08j4

Wolfram Research (2014),Graph3D,Wolfram 语言函数,https://reference.wolfram.com/language/ref/Graph3D.html.
文本
Wolfram Research (2014),Graph3D,Wolfram 语言函数,https://reference.wolfram.com/language/ref/Graph3D.html.
Wolfram Research (2014),Graph3D,Wolfram 语言函数,https://reference.wolfram.com/language/ref/Graph3D.html.
CMS
Wolfram 语言. 2014. "Graph3D." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/Graph3D.html.
Wolfram 语言. 2014. "Graph3D." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/Graph3D.html.
APA
Wolfram 语言. (2014). Graph3D. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/Graph3D.html 年
Wolfram 语言. (2014). Graph3D. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/Graph3D.html 年
BibTeX
@misc{reference.wolfram_2025_graph3d, author="Wolfram Research", title="{Graph3D}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/Graph3D.html}", note=[Accessed: 14-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_graph3d, organization={Wolfram Research}, title={Graph3D}, year={2014}, url={https://reference.wolfram.com/language/ref/Graph3D.html}, note=[Accessed: 14-May-2025
]}