graphplot graph: How to fix several node positions?

1 次查看(过去 30 天)
I have a connected graph of ~30 nodes and ~100 connections. I uploaded an example. I have a 'central few' of ~8 labeled nodes, and want those to be centrally located. (PS: I want to do this programmatically, not by hand).
  • Q1) How might I glue down the position of the central nodes, then let 'force' redistribute the rest?
If I edit XData(1:8) and YData(1:8) after plot(G,..,'force'), those nodes look clearly out of place. I tried a loop feeding the old XData into the new XStart, but even 'iterations' = 1 was enough for those nodes to jump away.
  • Q2) Is it possible to 'weight' nodes differently than just # of edges (ie, assign some inertia) during the iterations?
I wouldn't mind trying to do the whole XData/YData iteration process in a script, so I can try options out myself.
  • Q3) Does anyone have a force-directed optimizing routine that mimics plot(G,..'force')? My searches went unsuccessful.
FYI: I'm a smart guy, but I'm no theoretical mathematician. :(

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graph and Network Algorithms 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by