In Mathematica v12.0,The function GraphPlot seems to give unexpected results when I try to draw a multigraph.

GraphPlot[{{1 -> 2, "a"}, {1 -> 2, "b"}, {2 -> 1, "c"}},DirectedEdges -> True, VertexLabels -> "Name"]

enter image description here I have noticed this answer that shows this is a bug introduced in version 9, fixed in version 10. But my experience indicated that it still exists on version 12.0. I don't know if it was my mistake or the truth?

  • $\begingroup$ Please post code, not images, so it is easy for others to copy/paste and reproduce. $\endgroup$ – Rohit Namjoshi Nov 21 '19 at 17:24
  • $\begingroup$ @Rohit Namjoshi thanks for the heads up. $\endgroup$ – 任天一 Nov 21 '19 at 17:36

You can use older GraphPlot. In version 12.0, it is renamed GraphComputation`GraphPlotLegacy.

GraphComputation`GraphPlotLegacy[{{1 -> 2, "a"}, {1 -> 2, "b"},{2 -> 1,"c"}}, 
  DirectedEdges -> True, VertexLabeling -> True]

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.