SachaEpskamp / qgraph

Developmental version of qgraph
GNU General Public License v2.0
68 stars 21 forks source link

Forcing nodes positions #92

Closed ogandril closed 4 months ago

ogandril commented 4 months ago

I want to plot two graphs with different edges but the same nodes, and I want the nodes to be at the same x-y position, so that the edges differences are easy to spot. Is there a way to force nodes positions?

Best

Olivier

PS: I'm a big fan of qgraph! It already solved a lot of issues I had regarding graph plotting!

SachaEpskamp commented 4 months ago

Just use the layout argument in qgraph. One way is to use:

L <- averageLayout(input1, input2)
qgraph(input1, layout = L, ...)
qgraph(input2, layout = L, ...)
ogandril commented 4 months ago

Worked like a charm!!! Thank's A LOT.