You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug in the dual edge when drawing edgelabels in the forceartist.
line 85: text = {edge: index for index, edge in enumerate(self.diagram.ordered_edges(self.diagram.dual))}
in this function, the uv direction might switch, which leads to incorrect display of edgelabel color.
so, for ForceDiagram edge (0,1), its dual_edge is (9,8). However, in the FormDiagram, this edge is (8,9). I think we need to check again whether the dual_edge exist in the dual_diagram in the dual_edge function. Another option is to modify the forcediagram.edge_index(self, form=None) function to solve this problem.
The text was updated successfully, but these errors were encountered:
There is a bug in the dual edge when drawing edgelabels in the forceartist.
line 85:
text = {edge: index for index, edge in enumerate(self.diagram.ordered_edges(self.diagram.dual))}
in this function, the uv direction might switch, which leads to incorrect display of edgelabel color.
I tried this in scripts/test_where_dual.py.
list(form.edges())
: [(0, 1), (1, 3), (1, 11), (1, 14), (1, 15), (2, 3), (3, 11), (3, 5), (4, 5), (5, 11), (5, 12), (5, 13), (6, 7), (7, 14), (7, 15), (8, 9), (9, 10), (9, 12), (9, 13), (11, 13), (11, 15), (12, 13), (14, 15)]form.edge_index()
: {(6, 7): 12, (7, 14): 13, (8, 9): 15, (9, 10): 16, (5, 12): 10, (1, 3): 1, (2, 3): 5, (1, 14): 3, (12, 13): 21, (1, 11): 2, (3, 5): 7, (7, 15): 14, (14, 15): 22, (9, 13): 18, (5, 11): 9, (0, 1): 0, (11, 15): 20, (3, 11): 6, (4, 5): 8, (5, 13): 11, (1, 15): 4, (9, 12): 17, (11, 13): 19}list(force.edges())
: [(0, 1), (0, 5), (1, 2), (1, 11), (1, 13), (2, 9), (2, 3), (3, 8), (3, 4), (4, 5), (4, 12), (4, 6), (5, 7), (5, 10), (5, 12), (5, 13), (6, 7), (6, 12), (7, 8), (8, 9), (9, 10), (10, 11), (11, 13)][force.dual_edge(edge) for edge in force.edges()]
: [(9, 8), (10, 9), (5, 4), (12, 5), (9, 12), (5, 3), (3, 2), (3, 1), (1, 0), (7, 6), (14, 7), (1, 14), (15, 11), (11, 13), (7, 15), (13, 9), (1, 15), (15, 14), (1, 11), (3, 11), (5, 11), (5, 13), (12, 13)]so, for ForceDiagram edge (0,1), its dual_edge is (9,8). However, in the FormDiagram, this edge is (8,9). I think we need to check again whether the dual_edge exist in the dual_diagram in the dual_edge function. Another option is to modify the
forcediagram.edge_index(self, form=None)
function to solve this problem.The text was updated successfully, but these errors were encountered: