is an option for Graph, GraphPlot, and related functions that specifies whether edges should be taken to be directed.
Details and Options
- DirectedEdges->True specifies that edges should be directed.
- DirectedEdges->False specifies that edges should be undirected.
Examplesopen allclose all
Basic Examples (5)
By default rules are taken to be directed edges:
Obtain a CycleGraph with directed edges:
Create a directed graph from a symmetric adjacency matrix:
Show edges as arrows in GraphPlot:
Do not show edges as arrows in LayeredGraphPlot:
DirectedEdges is an option to special graph constructors including PathGraph:
CompleteGraph, GridGraph, and ButterflyGraph:
CycleGraph, StarGraph, and WheelGraph:
CompleteKaryTree and KaryTree:
DirectedEdges->True prevents AdjacencyGraph from creating undirected graphs:
DirectedEdges works with RandomGraph and UniformGraphDistribution:
By default, edges are shown as lines in GraphPlot and TreePlot:
By default, edges are shown as arrows in LayeredGraphPlot:
Wolfram Research (2007), DirectedEdges, Wolfram Language function, https://reference.wolfram.com/language/ref/DirectedEdges.html.
Wolfram Language. 2007. "DirectedEdges." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DirectedEdges.html.
Wolfram Language. (2007). DirectedEdges. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DirectedEdges.html