Open alex-wenzel opened 5 years ago
When you use the cx format the style of the graph (background-color, etc) is supposed to be included in the cx graph and cyjupyter tries to get that from the graph and ignore the visual_style that you pass to it. I don't have much experience with the cx format but I guess a workaround would be to include the style in you cx graph
I have
cyjupyter==0.2.0
and I am trying to follow the steps outlined in the example notebook for mapping data to node background colors. I have a simple networkneighbor_net
which is andex2.nice_cx_network.NiceCXNetwork
. I have set a single attribute such that running the codeproduces
I am defining a custom style using this code
and this code
produces this visualization
I would expect GP1BA to be colored red, but that is not the case. I read in the docs that missing values will be replaced with the extrema, so my hypothesis is that something under the hood in
Cytoscape()
isn't reading the attribute I set in the way I expect it to.I also tried to use
networkx
v2.3 to more closely mimic the example notebookand this code produces the output I expect:
Because
Cytoscape()
allowsformat=cx
, its not clear to me why I had to convert to a networkx format first to get this to work.