equal
deleted
inserted
replaced
85 offset = float(self.max_length - nb) / 2 |
85 offset = float(self.max_length - nb) / 2 |
86 for i in xrange(nb): |
86 for i in xrange(nb): |
87 if c=="northwest": |
87 if c=="northwest": |
88 self.cat_nb_nodes[c].append({ "x": offset, "y": order*500 }) |
88 self.cat_nb_nodes[c].append({ "x": offset, "y": order*500 }) |
89 else: |
89 else: |
90 self.cat_nb_nodes[c].append({ "x": 100*(i+offset), "y": order*500 }) |
90 if (i%2) == 0: |
91 |
91 self.cat_nb_nodes[c].append({ "x": 100*(i+offset), "y": order*500 }) |
|
92 else: |
|
93 self.cat_nb_nodes[c].append({ "x": 100*(i+offset), "y": order*450 }) |
92 |
94 |
93 class CircleNodePlacer(NodePlacer): |
95 class CircleNodePlacer(NodePlacer): |
94 |
96 |
95 def init(self, cat_nb_nodes_initial): |
97 def init(self, cat_nb_nodes_initial): |
96 for i_cat,c in enumerate(cat_nb_nodes_initial): |
98 for i_cat,c in enumerate(cat_nb_nodes_initial): |