Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 1: replicate users.

Coloring GraphML for yEd to make Beautiful and Free Visualizations of your Graphs

Graph Voyager

Neo4j has a useful procedure called

call apoc.export.graphml.query(
'MATCH (n) OPTIONAL MATCH p = (n)-[r]-(m) RETURN n,r,m',
 'yourPath/exportQuery.graphml', {useTypes:true})

This can allow you to easily visualize your data in yEd by yWorks, a very useful diagramming tool that can handle lightweight models at scale and provide different ways to organize and visual your data which is not offered in the Neo4j Browser. However, the current procedure outputs a fairly barebones graphml file, it only uses one shape (squares) and only 1 color (banana yellow). Despite the usefulness of seeing the graph topology and structure, it is also useful to see the various types of nodes that may be present in the graph as well. However, much of the meta data still gets transferred to the graphml file despite it not being used.

I have made a pretty simple python script that reads in a graphml file and dictionary object which states the shape and color of different node labels in the graph and then colorizes and labels the data with both id keys and shapes. The script can be found here: feel free to check it out and use it. Below is an example of the difference between the graphml yEd visualizations.



Cheers and Happy graphing


Graph Fellow

Thanks for submitting!

I’ve added a tag that allows your blog to be displayed on the community home page!

Nodes 2022
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online