Closed joseberlines closed 3 years ago
If I call the function G.get_style()
then I get the output I think you're expecting:
you can also do:
print(G.cytoscape_style)
Probably the cytoscape_style
attribute should be renamed to style
but that's a very backwards incompatible change.
I observe the following behaviour:
if you print the nodes of a graph:
G.graph.nodes
you get:a list of nodes The same applies for edges.
But, when you do:
G.get_style
the output is:
<bound method CytoscapeWidget.get_style of CytoscapeWidget(cytoscape_layout={'name': 'cola'}, cytoscape_style=[[[{'selector': "node[id='BER']", ...
In order to be consistent I would expect two methods to show the list of styles (without the layout) and another method for a layout.
something like:
G.style
would give a list: [{'selector': "node[id='BER']", ...`and G.layout would give:
['cola']
I think this would be more consistent and would help to debug and build graphs in notebooks.
Actually:
print(type(G.graph.nodes))
isspectate.models.List
but
print(G.get_style)
ismethod
I think all should be the same kind of data, i.e. edges, nodes, style and layout.
EDIT1: This will allow easier comparison of graph style properties