Help in R gplot from Carter
From InterSciWiki
Doug White wrote:
gplot(n1, coord = cbind(v2,4*v1),gmode = "digraph", vertex.col=v1, vertex.cex=2,l,xlim=c(0,1))
with our without xlim I cant make my graph plot thicken in the x <--> width of the image, its very thin (orig coords between .02 and .98), the y axis nodes do spread out (they were between 1 and 9)
What should I do?
Hmm. It looks like you are spreading out the y axis here, which is what is making the network tall/thin; reducing the multiplier on your y variable should help that. Is the problem that (without multiplication) everything seems too compressed in the image? This can happen when you have a graph which is just too dense/tangled to display well. Some tips which are often useful:
1. Shrink the vertices, using vertex.cex. Start with something like vertex.cex=0.75, and go from there.
2. If producing output for print, set up your page settings to produce a physically large display and then shrink it in post-processing. This can produce good results in certain cases for which it's hard to get all the adjustments right otherwise. For instance, you can use a command like postscript("myhugeplot.ps",width=20,height=20) to set up a huge display, write the plot to it (remembering to close the device afterward with dev.off(), if you don't usually use this method), and then either downsize the image directly (using ImageMagick, the Gimp, etc.) or downsize it when including it within your document (in LaTeX, I use the \resizebox command).
3. For certain output devices (e.g., pdf()), you can try using semi-transparent edges. The trick in this case is to add an argument like edge.col=rgb(0,0,0,0.5) (depending on the color/alpha value you want) to gplot. On supported display devices, this will make edges translucent...I have found that on really huge networks, this can reveal certain types of structure which are otherwise easily missed.
Those are some initial ideas. Other tricks are possible, but everything does depend on the exact nature of the network (and what you are trying to show in the plot). Hope those help!
-Carter
PS. You might also want to check out the statnet help mailing list...it doesn't get too much traffic, but there are some pretty savvy folks on there these days who often have good ideas for solving various kinds of problems. I think that the sign-up instructions are on the statnet web site (http://www.statnetproject.org/).
