What is the difference (in purpose) between Graph
and GraphPlot
? Which function is bested suited to which tasks?
Background: I just spent the last two hours trying to make this graph readable:
trans = Uncompress@
"1:eJyVV01vwjAMRfu47U/sv3RKKc2KGsahxw2YOE0aXPff17RJSZD8/HIBga3Efn5+\
dl4/f/rT32q1ujyNH+35cj09+F8v40d1/j1+XY+\
Ht8P30T2Pf9ihbyvn7Y0T3GbjzZtyM5LbYmcP9Els++FdTWJy7EwrOEYzTjbeRkHyODnvB\
adgnb7d8KHi4e3OgBudmb5sB3xsV1CBOTLpymCdv1sp/\
mBlzhq9tJrfqolRC9aSDNSzGPwxFv5f05GAldDVoJKbrgBWJsnCIuFMB/\
28JVXNMR7IQsfVvZSTCD07V79Z78Clo1VLIS+YVn5/2H67Q3h4M83wZr2B4W/\
oCmhaFDXSWysUWcVpH4sElyUTFYsEGxnPRl7nlRgTFoFBu0xGjuDToRLAs5GeeDWqes22H\
ORPLDl/FENXLXCmuVWQanrkBwmT88uGjhh8JgIyYRI91EW4aBoqtOIbg60RxD+IAGjuZC+\
QRSeXfC2qkhGor6gqD60WfdoZTOy8SGu9iONKFEJeVO7eELQGMvOD0UDYaXHN5a6DT5Zlv\
GuYlu2TmhIyD726bP5gSnswmEttWR9puG1wH6WE1VuSBI2sVNA6cfxlK6JIx7utFDE7vI5\
lyAL+Kv09FopgpA9t+\
cIcCcjZMXgYV4YWrHd86DFyR2xpTh012aCEY8sSoy3sX3A0OHUHTjWYWgR8fv/wd/kB";
Graph[DeleteDuplicates@trans, VertexLabels -> Placed["Name", Center],
VertexShapeFunction -> "Capsule", VertexSize -> 1,
VertexLabelStyle -> Large,
EdgeShapeFunction ->
GraphElementData["ShortUnfilledArrow", "ArrowSize" -> 0.02]]
Then I discovered that GraphPlot
produces much more readable results:
GraphPlot[
DeleteDuplicates@trans /. (DirectedEdge[a_, b_] -> Rule[a, b]),
VertexLabeling -> True, DirectedEdges -> True]
which prompted me to wonder: what's the point of Graph
?
Of course I noticed this, while related, which asks about the Combinatorica package.
Graph
is not simply a way to plot graphs. It is a whole new data type on which you can perform lots of operations. It just happens to be displayed as its visualization. $\endgroup$