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 Directed and Undirected Graphs.
|Add new node to graph|
|Remove node from graph|
|Add new edge to graph|
|Remove edge from graph|
|Reverse edge directions|
|Number of nodes in graph|
|Number of edges in graph|
|Locate node in graph|
|Locate edge in graph|
|Number of edges between two nodes|
|Reorder graph nodes|
|Measure node importance|
|Connected graph components|
|Biconnected graph components|
|Block-cut tree graph|
|Topological order of directed acyclic graph|
|Determine if graph is acyclic|
|Determine whether two graphs are isomorphic|
|Compute isomorphism between two graphs|
|Determine whether graph has multiple edges|
|Reduce multigraph to simple graph|
|Breadth-first graph search|
|Depth-first graph search|
|Shortest path between two single nodes|
|Shortest path tree from node|
|Shortest path distances of all node pairs|
|Find all paths between two graph nodes|
|Maximum flow in graph|
|Minimum spanning tree of graph|
|Determine whether graph contains cycles|
|Find all cycles in graph|
|Fundamental cycle basis of graph|
|Graph plot for directed and undirected graphs|
|GraphPlot Properties||Graph plot appearance and behavior|
Introduction to directed and undirected graphs.
This example shows an application of sparse matrices and explains the relationship between graphs and matrices.
This example shows how to access and modify the nodes and/or edges in a
digraph object using the
This example shows how to add attributes to the nodes and edges in graphs created using
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.
This example shows how to customize
GraphPlot data tips to display extra node properties of a graph.
This example shows how to define a function that visualizes the results of
dfsearch by highlighting the nodes and edges of a graph.