Created
January 27, 2012 20:47
-
-
Save quantombone/1690842 to your computer and use it in GitHub Desktop.
an example of matlab graphviz wrappers to display graphs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%Create an empty directory and run this function inside Matlab | |
%Tomasz Malisiewicz ([email protected] | |
%Clone my repository with Matlab-graphviz wrappers | |
fprintf(1,'Cloning git repositories\n'); | |
unix(['git clone [email protected]:quantombone/' ... | |
'graphviz_matlab_magic.git']) | |
addpath(genpath(pwd)) | |
%Download a matrix which will be rendered via Graphviz | |
unix('wget http://www.cise.ufl.edu/research/sparse/mat/Bai/qc324.mat') | |
load('qc324.mat'); | |
A = full(real(Problem.A)); | |
params = sexy_graph_params(A); | |
params.sfdp_coloring = 1; | |
params.file_prefix = 'synthetic'; | |
sexy_graph(A,params); | |
fprintf(1,'Now open /tmp/synthetic.pdf\n'); | |
unix('open /tmp/synthetic.pdf'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment