# Double arrow in GraphPlot

Is it possible to combine two edges into one with a double arrow?

For example:

GraphPlot[{1 -> 2, 2 -> 1}, VertexLabeling -> True,
DirectedEdges -> True]


results something like

Is it possible to change it to something like

without using the drawing tool to edit the graphics directly?

• Which version of Mathematica are you using? Apr 20, 2013 at 19:02
• version 8 on Mac. Apr 20, 2013 at 19:05

This is a hack, but it'll work with GraphPlot:

GraphPlot[{1 -> 2, 2 -> 1, 1 -> 3, 3 -> 2}, MultiedgeStyle -> .001,
DirectedEdges -> True]


• Thanks, that works. But the combined line seems slightly thicker than the others, do you know how to deal with that? Apr 20, 2013 at 19:23
• @user0501 Unfortunately no. I'd have to search the docs more for that and right now I do not have the time. Also, ideally there should be a solution for Graph objects, not just GraphPlot. My answer is by no means complete. Apr 20, 2013 at 19:35
• @user0501 I'm trying to do the same thing with LayeredGraphPlot with little success, so I might try Szabolcs solution. However, from your comment, to deal with the thicker double arrow, could you add something in such that if a rule and its inverse are both found, to reduce the thickness of each resulting edge by 50%? Jun 12, 2015 at 19:47

The option settings False and None are not listed among documented typical settings, but both MultiedgeStyle -> False and MultiedgeStyle -> None give the desired result.

GraphPlot[{1 -> 2, 2 -> 1},
MultiedgeStyle -> False,
DirectedEdges -> True, VertexLabeling -> True]


GraphPlot[{1 -> 2, 2 -> 1, 1 -> 3, 3 -> 2},
MultiedgeStyle -> False,
DirectedEdges -> True,  VertexLabeling -> True]


GraphPlot[{1 -> 2, 2 -> 1, 1 -> 3, 3 -> 2},
MultiedgeStyle -> None,
DirectedEdges -> True,  VertexLabeling -> True]


Notes:

• This works in version 9 (windows 10) and in version 11.2 on Wolfram Cloud.
• After major updates in version 12.0, GraphPlot usage/options changed completely. Use GraphComputationGraphPlotLegacy instead of GraphPlot` for the code above to work.