Closed jotech closed 1 year ago
Another solution is to pass the absolute values of weights explicitly to layout_with_fr
instead of letting the function take them automatically from the graph. This way it won't be necessary to modify the weights stored in the graph.
good point! I updated my pull request accordingly
Another note is that most (though not all) igraph functions with dots in their name are deprecated. It's a good idea to replace these by the new names, which usually have underscores. To find the new name, simply look up the old name in the documentation. So layout.reingold.tilford
should be layout_with_fr
to future-proof the code.
Seems good to me at least but I would leave it to @hallucigenia-sparsa to decide on the merge.
If could you update version number to 0.1.2 in this PR that would be useful.
Thanks for the fix.
The network plot in
plotA
from the tutorial does not work with the current igraph version:The Fruchterman-Reingold layout in igraph needs weights > 0 (see https://igraph.org/r/doc/layout_with_fr.html).
The pull request uses absolute values instead and saves old values as
weight.org
.