How to manually set layers for graph plot?
显示 更早的评论
Was wondering if anyone knew any methods for manually setting the layering order of nodes in a graph plot. I have a graph with nodes that have values associated from 1 to 20. What I was hoping for was to be able to have all nodes of value 1 on the top row, all nodes of value 2 on the second row, all nodes of value 3 on the third row, and so on up to the 20th row.
Additionally, if a node at level 3 goes to a node at level 7, I want those two nodes to be on the third and seventh rows, with a line connecting them. Basically all nodes need to be at the level they are matched with as their value.
I am very close with the ability to set the Layout property of the graph plot to 'layered' so that it takes on the row appearance, but not with the specific behavior I'm describing above. Thank you!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Networks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!