Differences between revisions 5 and 6
Revision 5 as of 2007-02-16 05:15:48
Size: 1231
Editor: c-67-183-21-142
Comment:
Revision 6 as of 2007-02-16 05:16:49
Size: 1276
Editor: c-67-183-21-142
Comment:
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
graphs.PetersenGraph().show()
}}}


{{{

TableOfContents

Introduction

Robert Miller is working on this project.

2D Plotting

  • matplotlib plotting is supported (albeit awkwardly) by NetworkX. Smooth interfacing of this functionality with SAGE (especially the notebook) is almost complete. Part of this implementation was writing a NetworkX graphics primitive. In this routine, each edge is treated as a spring; after each node is randomly placed on the plot screen, fifty iterations allow the "springs" to align themselves in equilibrium, often revealing geometric symmetries of the graph (try plotting a Platonic solid...). There are also options to pre-specify vertex positions: the graph class now comes with an optional positioning variable, so that if a user likes to think of a graph in a certain visual layout, that layout can be made part of the graph information. Boundary nodes default to plot a different color, and edge labels will soon be displayed. Pending another graphics primitive, graphics objects can be associated with nodes so that the plots show up in place of the nodes when a graph is displayed.
  • Examples:

graphs.PetersenGraph().show()

graphs.CubeGraph(5).show(vertex_labels=False, node_size=100)

attachment:5-cube.png

graph_plotting (last edited 2008-11-14 13:42:15 by localhost)