Help with visualizing in the graph-notebook
I am trying to visualize a graph in the graph-notebook but no matter what I do I cannot get it to be correct.
So I have a very simple graph that has like 6 vertices, connected with maybe 8 edges, and I want to just visualize that graph with the labels of the vertices and edges on the visualization and the properties available if you select the details.
I have tried may variations of g.V().out().path / g.V().outE().inV().path() with elementMap() before path, using path().by(elementMap()), as well as trying from g.E() and other things. Nothing seems to work, randomly edges are missing labels, or an exta edge is added to each vertex that just goes to itself.
Anyone know how to do this?
Solution:Jump to solution
Found this https://github.com/aws/graph-notebook/blob/c357870d2a5bce88c986fa114b613ec72ce065f7/src/graph_notebook/notebooks/02-Visualization/Grouping-and-Appearance-Customization-Gremlin.ipynb#L23 and ended up getting a solution with
```
%%gremlin -p v,oute,inv -l 30
g.V().outE().inV().path().by(elementMap())...
GitHub
graph-notebook/src/graph_notebook/notebooks/02-Visualization/Groupi...
Library extending Jupyter notebooks to integrate with Apache TinkerPop, openCypher, and RDF SPARQL. - aws/graph-notebook
2 Replies
Solution
Found this https://github.com/aws/graph-notebook/blob/c357870d2a5bce88c986fa114b613ec72ce065f7/src/graph_notebook/notebooks/02-Visualization/Grouping-and-Appearance-Customization-Gremlin.ipynb#L23 and ended up getting a solution with
GitHub
graph-notebook/src/graph_notebook/notebooks/02-Visualization/Groupi...
Library extending Jupyter notebooks to integrate with Apache TinkerPop, openCypher, and RDF SPARQL. - aws/graph-notebook
By changing to
I was able to also visualize the non-connected vertices in the graph.