({{, EdgeRenderingFunction 
is an option for (RefLink[GraphPlot, paclet:ref/GraphPlot]) and related functions that gives a function to generate the graphics primitives to use in rendering each edge.}})

OpenersNotesSection(Spacer1)Details

EdgeRenderingFunction->g specifies that each edge should be rendered with the graphics primitives given by g[{(Subscript[r, i]),…,(Subscript[r, j])},{(Subscript[v, i]),(Subscript[v, j])},(Subscript[lbl, ij])], where (Subscript[r, i]), (Subscript[r, j]) are the beginning and ending points of the edge, (Subscript[v, i]), (Subscript[v, j]) are the beginning and ending vertices, the (Subscript[lbl, ij]) is any label specified for the edge.

The graphics primitives obtained by applying EdgeRenderingFunction are in effect directly spliced into the graphic generated by a function like (RefLink[GraphPlot, paclet:ref/GraphPlot]). (RefLink[Inset, paclet:ref/Inset]) can be used to insert an arbitrary expression.

EdgeRenderingFunction->(RefLink[Automatic, paclet:ref/Automatic]) renders edges according to the styles specified by (RefLink[DirectedEdges, paclet:ref/DirectedEdges]) and (RefLink[EdgeLabeling, paclet:ref/EdgeLabeling]).

Settings for (RefLink[PlotStyle, paclet:ref/PlotStyle]) define defaults that can be overridden by explicit directives in EdgeRenderingFunction.

OpenersPrimaryExamplesSection(Spacer1)Examples  (5)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Draw edges as red arrows set back by a small amount:

LayeredGraphPlot[{1->5,2->4,3->4,3->5,4->5},EdgeRenderingFunction->({Red,Arrow[#1,0.1]}&)]

Draw edges as cylinders and vertices as spheres:

GraphPlot3D[{2->3,2->4,2->5,3->4,3->5,4->5},EdgeRenderingFunction->(Cylinder[#1,0.05]&),VertexRenderingFunction->(Sphere[#,0.1]&)]

Do not draw edges at all:

GraphPlot3D[Table[1,{100},{100}],EdgeRenderingFunction->None,VertexRenderingFunction->(Sphere[#,0.05]&)]

OpenersExampleSection1(Spacer1)Scope  (2)

Draw text on each edge:

GraphPlot[{4->1,5->1,3->2,2->5,3->4,3->5,5->4},EdgeRenderingFunction->({Arrow[#],Inset["Mathematica",Mean[#1],Automatic,Automatic,#[[1]]-#[[2]],Background->White]}&)]

Draw graphics on each edge:

arrow=;

GraphPlot[{2->1,3->1,4->1,5->1,6->1},EdgeRenderingFunction->({Line[#],Inset[arrow,Mean[#1],Automatic,Automatic,#[[2]]-#[[1]],Background->White]}&)]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[DirectedEdges, paclet:ref/DirectedEdges])  ▪  (RefLink[MultiedgeStyle, paclet:ref/MultiedgeStyle])  ▪  (RefLink[SelfLoopStyle, paclet:ref/SelfLoopStyle])  ▪  (RefLink[Arrow, paclet:ref/Arrow])  ▪  (RefLink[Arrowheads, paclet:ref/Arrowheads])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Graph Drawing, paclet:tutorial/GraphDrawingOverview])}, {▪(RefLinkPlain[General Graph Drawing, paclet:tutorial/GraphDrawing])}, {▪(RefLinkPlain[Hierarchical Drawing of Directed Graphs, paclet:tutorial/LayeredGraphDrawing])}, {▪(RefLinkPlain[Tree Drawing, paclet:tutorial/TreeDrawing])}})}})