Code covered by the BSD License  

Highlights from
MATLAB - GraphViz interface

4.46667

4.5 | 15 ratings Rate this file 77 Downloads (last 30 days) File Size: 15.58 KB File ID: #4518

MATLAB - GraphViz interface

by Leon Peshkin

 

23 Feb 2004 (Updated 06 Dec 2004)

Interface GraphViz graph layout and MATLAB user interface power.

| Watch this File

File Information
Description

Feb 2004 Massachusetts Institute of Technology, AI Lab
MATLAB <-> GraphViz by Dr. Leon Peshkin: pesha @ ai.mit.edu | http://www.csail.mit.edu/~pesha

this is a README file for `ad hoc' MATLAB package created to interface AT&T GraphViz graph layout and MathWorks MATLAB user Interface powers. Please make sure you have both MATLAB and GraphViz properly installed on your system. The package works on Unix and even on Windows. Use at your own risk.

README - this file
graph_to_dot.m - Creates a GraphViz formated file from a graph given by an adjacency matrix.
dot_to_graph.m - Extracts an adjacency matrix, node labels, and layout from a GraphViz file.
graph_draw.m - Draws a graph in MATLAB with a given layout
  make_layout.m - used to do a lame layout in case no layout is fed to graph_draw
draw_dot.m - a sample code illustrating use of package functions.
                  draws a graph defined by adjacency matrix, by
                    -first converting it to a GraphViz file (graph_to_dot)
                    -then calling NEATO of GraphViz to do a layout
                    -then importing layout file back into Matlab (dot_to_graph)
                    -finally calling graph_draw to display the layout
sample_click.m - an auxiliary sample code which allows to right-mouse-click on the nodes of
                  a graph to call a dummy function currently just printing that node's label
my_setdiff.m - my version of setdiff() which works much faster

Acknowledgements
This submission has inspired the following:
MATLAB GraphViz Layout importer
MATLAB release MATLAB 6.1 (R12.1)
Other requirements GraphViz from AT&T
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (17)
28 Feb 2004 Nick Valuy

long awaited tool, must be a standard distr.

29 Mar 2004 Ben Zana

nice!

02 Apr 2004 Nick Henderson

I have been using the tool to visualize gene networks. I found and fixed a small bug in graph_to_dot. I have already emailed the author. But, for the time being you may use this link:

http://www.owlnet.rice.edu/~nwh/repfug/ode/graph_to_dot.m

Other than that, I am a big fan of Graphviz and the matlab interface!

09 Oct 2004 Koni Wolka

I wish this came as a toolbox from Matlab!
Great job!

23 Nov 2004 Sébastien Vast

Very interesting tools but lack of certain
features for my usage in biochemical network
But it is easy to add these

05 Apr 2005 Etienne Lefebvre  
10 May 2005 Jing Tang

excellent work! I will use it in my project..

16 Feb 2006 son hong

intgrate

12 Dec 2006 Stephen Cowen

Good. Definitely Beta, but good. Would be nice if it had a demo script that would generate some sample graphs to illustrate the functions.

30 Apr 2008 Michael Jachan

i rely on it :)

29 Jun 2008 Yuri Medvedev

Highly professional work.

19 Sep 2008 Valentina Rossetti

I was just looking for something like that - thank you, it's very nice!

26 Sep 2008 Mark Bolan

Matlab keeps indicating error: neato command not found. How do I resolve this issue?

02 Mar 2010 Marco Canini

I found a bug on line 92 of dot_to_graph.m. The original uses %d in the sscanf but it should be like this:
[node_pos] = sscanf(line(pos_pos:length(line)), ' pos = "%f,%f"')';

17 Apr 2010 Shicai Yang

[node_pos] = sscanf(line(pos_pos:length(line)), ' pos = "%f,%f"')';

it does work. thank you.

20 Oct 2010 Jonathan C. Lansey

??? Undefined function or variable 'range'.
I replaced range with max(x)-min(x) and i worked!

31 Oct 2011 Wilmer

I try to run sample_click.m, but I have the error:
??? Error: File: sample_click.m Line: 7 Column: 1
Function definitions are not permitted in this context.

Thanks....

Please login to add a comment or rating.
Updates
13 Apr 2004

arc lables; other minor changes
like isolated nodes.

06 Dec 2004

arc lables; other minor changes
like isolated nodes.

Tag Activity for this File
Tag Applied By Date/Time
graphics import Leon Peshkin 22 Oct 2008 07:14:53
graphics export Leon Peshkin 22 Oct 2008 07:14:53
graph Leon Peshkin 22 Oct 2008 07:14:53
draw Leon Peshkin 22 Oct 2008 07:14:53
plot Leon Peshkin 22 Oct 2008 07:14:53
layout Leon Peshkin 22 Oct 2008 07:14:53
undirected Leon Peshkin 22 Oct 2008 07:14:53
neato Leon Peshkin 22 Oct 2008 07:14:53
dotty Leon Peshkin 22 Oct 2008 07:14:53
edge Leon Peshkin 22 Oct 2008 07:14:53
graphviz Leon Peshkin 22 Oct 2008 07:14:53
directed_graph Mojtaba Nourian 07 Nov 2008 13:57:19
layout OUKSSIM hicham 21 Jan 2010 07:24:23

Contact us at files@mathworks.com