Graph

Graph[{e1,e2,}]

yields a graph with edges ej.

Graph[{v1,v2,},{e1,e2,}]

yields the graph with vertices vi and edges ej.

Graph[{,wi[vi,],},{,wj[ej,],}]

yields a graph with vertex and edge properties defined by the symbolic wrappers wk.

Details and Options

Examples

open allclose all

Basic Examples  (5)

An undirected graph:

In[1]:=
Click for copyable input
Out[1]=

A directed graph:

In[1]:=
Click for copyable input
Out[1]=

Style vertices and edges:

In[1]:=
Click for copyable input
Out[1]=

Use wrappers to input directly:

In[2]:=
Click for copyable input
Out[2]=

Label vertices and edges:

In[1]:=
Click for copyable input
Out[1]=

Use different vertices and edges:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (27)

Options  (84)

Applications  (4)

Properties & Relations  (3)

Possible Issues  (1)

See Also

TreeGraph  PathGraph  AdjacencyGraph  IncidenceGraph  GraphData

Introduced in 2010
(8.0)
| Updated in 2016
(10.4)