Skip to main content
11 events
when toggle format what by license comment
Dec 21, 2020 at 21:33 history edited kglr
edited tags
Dec 20, 2019 at 9:03 answer added kglr timeline score: 2
Jul 16, 2015 at 18:34 comment added Szabolcs Yes, you're right LayeredGraphPlot used to give nicer output ... I'd try converting the graph manually to a format supported by LayeredGraphPlot.
Jul 16, 2015 at 17:14 comment added László Thanks, this is useful. GraphLayout -> "LayeredEmbedding" does help. But for my more complicated use case, it messed up the layers, while obsolete/deprecated LayeredGraphPlot was more helpful with a proper tree structure with edges always pointing downwards (e.g.), never upwards. Is there an ever better way? (My graph is not a proper tree, but close.)
Jul 16, 2015 at 15:42 comment added Szabolcs Sorry, no time to dig into this ... that's why this is only a comment. In short, I think the only reason GraphPlot functions are still around is backwards compatibility...
Jul 16, 2015 at 15:42 comment added Szabolcs This is likely because *GraphPlot functions are the old way to visualize a graph, from before when Mathematica got a Graph datatype. I'd consider them deprecated. Originally they just took a pair-list or a rule-list, not a Graph. They've been updated to support Graph, but it seems the conversion loses both labels and names, and keeps only vertex indices. You can either convert on your own (Rule@@@EdgeList[g] will be accepted by GraphPlot), or you can use the new way to visualize the graph, SetProperty[g, GraphLayout -> "LayeredEmbedding"].
Jul 16, 2015 at 14:21 comment added László @Szabolcs Point taken, now you have the working example.
Jul 16, 2015 at 14:21 history edited László CC BY-SA 3.0
proper working example
Jul 16, 2015 at 11:59 comment added Szabolcs Can you give a complete example please?
Jul 16, 2015 at 10:45 history edited László CC BY-SA 3.0
mentioning edge labels and more general GraphPlot
Jul 16, 2015 at 2:14 history asked László CC BY-SA 3.0