I have found this answer really useful. It helps me plot network/graphs and select the coordinates for the nodes in the plot.
However, the layout rescales the coordinates to -1 to 1. First off I tried to find out how it does this but couldn’t. does it do something like this??
(coordinate - mean(coordinates))/(coordinate + mean(coordinates)
Second is there a way to keep the original coordinates? I woudl like to plat axes with the graph and so would prefer not to have top rescale everything.
The answer to your first question is in the source code of the
plot.igraphfunction; typeplot.igraphin the R prompt to get the full source code. There is a part in there which says:layout.normis another function ofigraphwhich does the magic for you; typelayout.normto see how it works.Now, the answer to the second question is really simple; just pass
rescale=Fto the arguments ofplot, which makesigraphskip the entire branch inplot.igraphwherelayout.normis called, so it will work with your original coordinates. You can then usexlimandylimas usual to set the limits of the X and Y axes.