Changeset 300 in main for trunk/openPLM/plmapp/navigate.py


Ignore:
Timestamp:
09/19/11 14:42:21 (8 years ago)
Author:
pcosquer
Message:

navigate:draw a directed graph

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM/plmapp/navigate.py

    r299 r300  
    125125        self.options["prog"] = "twopi" 
    126126        self.options["doc_parts"] = [] 
    127         self.graph = pgv.AGraph() 
     127        self.graph = pgv.AGraph(directed=True) 
    128128        self.graph.graph_attr.update(self.GRAPH_ATTRIBUTES) 
    129129        self.graph.node_attr.update(self.NODE_ATTRIBUTES) 
     
    354354        edges = self.graph.edges() 
    355355        self.graph.remove_edges_from(edges) 
    356         s = str(self.graph)  
     356        s = str(self.graph) 
    357357        s = s[:s.rfind("}")] 
    358358        edges.sort() 
    359         s += "\n".join("%s -- %s;" % (a,b) for a, b in edges) + "}\n" 
     359        s += "\n".join("%s -> %s;" % (a,b) for a, b in edges) + "}\n" 
    360360        self.graph.close() 
    361361        self.graph = FrozenAGraph(s) 
Note: See TracChangeset for help on using the changeset viewer.