Everybody who loves computer sciences loves graphs. But the fat 'n juicy graphs, the ones with complex structure you just gotta visualize. To enjoy these beautiful data structures, the hackers at AT&T gave us, the world, Graphviz as a powerful tool for visualizing complex graphs in two dimensions. I do a lot of stuff in Matlab, so I've put my simple graphviz matlab wrappers up on Github so everybody can enjoy them. I do a lot of stuff with graphs...
My repository, which I'm already using as a submodule in many of my projects, can be found here:
Here is a matlab script (included as a Github gist), which should be ran in an empty directory, and it will download a nice mat file plus clone my repo and show the following nice graph. I perform two graphviz passes where the first one is used to read the graphviz coordinates (from the sfdp embedding) and use Matlab's jet colormap to color the edges based on distances in this space. In other words, nearby nodes which are connected will be connected by red (hot) edges and faraway nodes will be connected by blue (cold) edges.
The matrix visualized comes from an electromagnetic model, the details can be found here: http://www.cise.ufl.edu/research/sparse/matrices/Bai/qc324.html
The original picture generated by Yifan Hu is here for comparison:
Thanks so much for releasing this. Very useful& works like magic.ReplyDelete
Thanks a lot for releasing this. How is it different from the following interface?ReplyDelete
This is awesome. Thank you.ReplyDelete
It seems that the script is not really working for me. I sometimes get an empty graph when there should be edges. Does the matrix need to fulfill certain requirements? All my matrices are symmetric matrices. Thank you very much!
I just tried, and it worked for me. I suggest you make sure your graphviz installation is working properly before using the matlab wrappers.ReplyDelete