Export igraph Issues in R – Education Career Blog

I have generated a few network graphs in igraph. I like to use tkplot, however, after resizing the window manually and changing the layout, my machine freezes up when I try to export or even take a screenshot of the graph.

Any ideas? My machine is Windows XP Pro and has 2GB memory.

Many thanks in advance.

,

I can’t reproduce your error on Windows 7. What you can try is

  1. to set the canvas size yourself in
    the tkplot command
  2. to use the
    function tkplot.export.postscript to
    call for the export dialog.

This can be done by:

g <- graph.ring(10)
x <- tkplot(g,canvas.width=800, canvas.height=800)
tkplot.export.postscript(x)

Worst case scenario you could extract the coordinates using tkplot.getcoords(x) and use the base plot functions to reconstruct the graph. This is a whole lot trickier off course, as you have to keep track of which vertices are connected and which not.

Leave a Comment