the position of the nodes are not displayed according to the position coordinates.
I also observe that:
G.get_layout()
gives:
{'name': 'cola'}
But I never declared layout = cola. Is cola a default value?
in https://js.cytoscape.org/#notation/position
it looks like the position is taken by the nodes only when there is no layout specified.
is that right?
Should I (somehow) delete the cola layout?
I have the following data:
`nodes4 = [{'id': 'UNO', 'label': '0.0-0.0','position_x': 0.0, 'position_y': 0.0}, {'id': 'DOS', 'label': '100.0-50.0', 'position_x': 100.0, 'position_y': 50.0}, {'id': 'TRES', 'label': '200.0-100.0', 'position_x': 200.0, 'position_y': 100.0}, {'id': 'CUATRO', 'label': '300.0-150.0', 'position_x': 300.0, 'position_y': 150.0}, {'id': 'CINCO', 'label': '600.0-150.0', 'position_x': 600.0, 'position_y': 150.0}]
edges4 = [{'id': 'line1', 'source': 'UNO', 'target': 'DOS', 'label': 'line1'}, {'id': 'line2', 'source': 'UNO', 'target': 'TRES', 'label':'line2'}, {'id': 'line3', 'source': 'DOS', 'target': 'TRES', 'label': 'line3'}, {'id': 'line4', 'source': 'TRES', 'target': 'CUATRO', 'label': 'line4'}, {'id': 'line5', 'source': 'CUATRO', 'target': 'CINCO', 'label': 'line5'} ] `
generating the following graph:
[Node(data={'id': 'UNO', 'label': '0.0-0.0', 'classes': 'no_class'}, position={'x': 0.0, 'y': 0.0}), Node(data={'id': 'DOS', 'label': '100.0-50.0', 'classes': 'no_class'}, position={'x': 100.0, 'y': 50.0}), Node(data={'id': 'TRES', 'label': '200.0-100.0', 'classes': 'no_class'}, position={'x': 200.0, 'y': 100.0}), Node(data={'id': 'CUATRO', 'label': '300.0-150.0', 'classes': 'no_class'}, position={'x': 300.0, 'y': 150.0}), Node(data={'id': 'CINCO', 'label': '600.0-150.0', 'classes': 'no_class'}, position={'x': 600.0, 'y': 150.0})]
[Edge(classes='no_class', data={'id': 'line1', 'source': 'UNO', 'target': 'DOS'}, position={}), Edge(classes='no_class', data={'id': 'line2', 'source': 'UNO', 'target': 'TRES'}, position={}), Edge(classes='no_class', data={'id': 'line3', 'source': 'DOS', 'target': 'TRES'}, position={}), Edge(classes='no_class', data={'id': 'line4', 'source': 'TRES', 'target': 'CUATRO'}, position={}), Edge(classes='no_class', data={'id': 'line5', 'source': 'CUATRO', 'target': 'CINCO'}, position={})]
resulting in:
the position of the nodes are not displayed according to the position coordinates.
I also observe that:
G.get_layout()
gives: {'name': 'cola'}
But I never declared layout = cola. Is cola a default value? in https://js.cytoscape.org/#notation/position it looks like the position is taken by the nodes only when there is no layout specified.
is that right? Should I (somehow) delete the cola layout?