#7004: Refactor the graph layout code, and add interface with graphviz
---------------------------------+------------------------------------------
   Reporter:  nthiery            |       Owner:  nthiery                        
       Type:  enhancement        |      Status:  needs_review                   
   Priority:  major              |   Milestone:  sage-4.3.3                     
  Component:  graph theory       |    Keywords:  graph layout, graphviz, acyclic
     Author:  Nicolas M. ThiƩry  |    Upstream:  N/A                            
   Reviewer:                     |      Merged:                                 
Work_issues:                     |  
---------------------------------+------------------------------------------

Comment(by rlm):

 I tried this again, and now I am getting a different (!) error:
 {{{
 AttributeError                            Traceback (most recent call
 last)

 /Users/rlmill/sage-4.3.2/devel/sage-main/<ipython console> in <module>()

 /Users/rlmill/sage-4.3.2/local/lib/python2.6/site-
 packages/sage/plot/misc.pyc in wrapper(*args, **kwds)
     136                 options['__original_opts'] = kwds
     137             options.update(kwds)
 --> 138             return func(*args, **options)
     139
     140

 /Users/rlmill/sage-4.3.2/local/lib/python2.6/site-
 packages/sage/graphs/generic_graph.pyc in plot(self, **options)
    9596         """
    9597         from sage.graphs.graph_plot import GraphPlot
 -> 9598         return GraphPlot(graph=self, options=options).plot()
    9599
    9600     def show(self, **kwds):

 /Users/rlmill/sage-4.3.2/local/lib/python2.6/site-
 packages/sage/graphs/graph_plot.pyc in __init__(self, graph, options)
      91         self._graph = graph
      92         self._options = options
 ---> 93         self.set_pos()
      94         self._arcs =
 self._graph.has_multiple_edges(to_undirected=True)
      95         self._loops = self._graph.has_loops()

 /Users/rlmill/sage-4.3.2/local/lib/python2.6/site-
 packages/sage/graphs/graph_plot.pyc in set_pos(self)
     137             sage: t.plot(heights={0:[0], 1:[4,5,1], 2:[2],
 3:[3,6]})
     138         """
 --> 139         self._pos = self._graph.layout(**self._options)
     140
     141     def set_vertices(self, **vertex_options):

 /Users/rlmill/sage-4.3.2/local/lib/python2.6/site-
 packages/sage/graphs/generic_graph.pyc in layout(self, layout, pos, dim,
 save_pos, **options)
    8952
    8953         if hasattr(self, "layout_%s"%layout):
 -> 8954             pos = getattr(self, "layout_%s"%layout)(dim = dim,
 **options)
    8955         elif layout is not None:
    8956             raise ValueError, "unknown layout algorithm:
 %s"%layout

 /Users/rlmill/sage-4.3.2/local/lib/python2.6/site-
 packages/sage/graphs/digraph.pyc in layout_acyclic_dummy(self, heights,
 **options)
    1482             levels = [sorted(z) for z in levels]
    1483             heights = dict([[i, levels[i]] for i in
 range(len(levels))])
 -> 1484         return self.layout_graded(heights = heights, **options)
    1485
    1486     def level_sets(self):

 AttributeError: 'DiGraph' object has no attribute 'layout_graded'
 }}}

 I'm baffled.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7004#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to