Skip to content
Advertisement

Visualize an RDFLIB Graph in Python

I am new to RDFLIB in python. I found this example of creating a graph on here. What is the simplest way to visualize graph created by this code?

JavaScript

I see that the rdflib package has a tools component that has a function called rdfs2dot. How can I use this function to display a plot with the RDF graph in it?

Advertisement

Answer

Using the hint in this question: https://www.researchgate.net/post/Is_there_any_open_source_RDF_graph_converter

I was able to plot the RDF Graph by converting to Networkx Graph and using the Networkx/Matplotlib plotting tools.

JavaScript

To visualise large RDF Graphs the styling might need some finetuning ;-)

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement