Graphs model the connections in a network and are widely applicable to a variety of physical, biological, and information systems. You can use graphs to model the neurons in a brain, the flight patterns of an airline, and much more. The structure of a graph is comprised of “nodes” and “edges”. Each node represents an entity, and each edge represents a connection between two nodes. For more information, see定向和无向图。
图形图 |
定向和无向图的图图 |
图形图属性 | 图表外观和行为 |
Introduction to directed and undirected graphs.
此示例显示了稀疏矩阵的应用,并解释了图和矩阵之间的关系。
This example shows how to access and modify the nodes and/or edges in a图形
orDigraph
对象使用添加
,,,,RMEDGE
,,,,addnode
,,,,rmnode
,,,,findedge
,,,,FindNode
,,,,and子图
functions.
Add Graph Node Names, Edge Weights, and Other Attributes
This example shows how to add attributes to the nodes and edges in graphs created using图形
andDigraph
。
This example shows how to plot graphs, and then customize the display to add labels or highlighting to the graph nodes and edges.
This example shows how to add and customize labels on graph nodes and edges.
此示例显示了如何自定义图形图
显示图形的额外节点属性的数据提示。
此示例显示了如何定义一个可视化的函数BFSearch
andDFSearch
通过突出显示图的节点和边缘。