Weighted GraphPlot Display
- To: mathgroup at smc.vnet.net
- Subject: [mg63996] Weighted GraphPlot Display
- From: Jim Fuite <jfuite at phys.ualberta.ca>
- Date: Fri, 27 Jan 2006 05:13:08 -0500 (EST)
- Organization: University of Alberta
- Sender: owner-wri-mathgroup at wolfram.com
Dear Mathematica Enthusiasts, I believe that only someone very experienced (or interested) with GraphPlot or Combinatorica should read further. I wish to display a large weighted graph using a spring/electrical layout algorithm that actually reflects the different weights of the edges. I wish that high weight edges would draw vertices together tightly, while low weight edges would allow for greater stretching of the edges between the vertices. GraphPlot seems to be the package of choice for large graphs; mine is of approximate order 4000 (vertices). Unless I have missed something, GraphPlot does not utilize weight information for the layout of a graph. For example, the symmetric adjacency matrix, linkArray, can be plotted to produce a simple undirected triangular graph: <<DiscreteMath`GraphPlot` linkArray ={{0,1,1},{1,0,1},{1,1,0}} GraphPlot[linkArray,"VertexStyleFunction"(Text[#,#]&)] If I try to include weight information, such as linkArray = {{0,1,3},{1,0,1},{3,1,0}} the layout of the graph does not change. GraphPlot cannot graphically communicate the properties of a weighted graph by the layout of the vertices. Color schemes or edge weight labels are not clear for large graphs. I want the shape of the graph to be altered by edges of differing weights. Therefore, my question is: has anybody altered the GraphPlot package to allow for the sophisticated layout of a weighted graph? If not, what are the prospects? My first guess would be to use spring constants that are proportional to the edge weights. I have tentatively looked through the GraphPlot package - it is not too large - but I have to admit I cannot understand how the internal ComponentsLayout function works. I would need a reference for octree data structures(?). It is disconcerting to me that GraphPlot can accept options, as in GraphPlot[linkArray, Method{"SpringElectricalModel","RepulsiveForcePower"-2}], but when I try to find "SpringElectricalModel" in the package, it does not appear. I welcome all comments or hints on how I might start to accomplish my goal without resorting to another program. Sincerely, Jim Fuite Department of Secondary Education Department of Physics University of Alberta jfuite at phys.ualberta.ca