Giter Site home page Giter Site logo

graphviz4matlab's Introduction

graphviz4matlab

Matlab interface to Graphviz graph layout package. Allows interactive editing of the resulting graphs!

GraphViz4Matlab is a MATLAB software package to display directed and undirected graphs within a figure window, written by Matt Dunham and Kevin Murphy (with contributions from Leon Peshkin and Dan Eaton). A number of layout algorithms are provided, most requiring that the free graphViz software be installed. Nodes can be interactively moved around and resized with the mouse, and layouts can be changed on the fly. This is quite similar to Matlab's view method for the biograph class in the bioinformatics toolbox. Requires Matlab version 7.6 (2008a) or newer.

Installation:

1.Install graphviz (version 2.2 or newer).

2.Add the Graphviz2.x\bin directory to your windows/linux path. On windows systems this is usually C:\Program Files\GraphViz2.x\bin. You can use the included addtosystempathGV.m function to do this within matlab.

3.Download graphViz4Matlab, unzip and add the package to your matlab path with, e.g. addpath(genpath('C:\graphViz4Matlab'))

4.Test the system: type graphViz4MatlabDEMO1 or just graphViz4Matlab.

Note, if you are running windows, the newest version now automatically adds graphViz to your system path, and adds all of its subdirectories to the matlab path when the main graphViz4Matlab.m file is run.

Usage: The simplest use case is drawNetwork(adj), where adj is an adjacency matrix. When the graph is displayed, you can click on the icons at the top to change the layout algorithm. You can also drag nodes around to manually refine the layout. Draw a mouse box around multiple nodes to move them simultaneously. For more options, type help graphViz4Matlab. You can see screenshots of the various layouts here and a list of optional input parameters here.

It is now possible to save and restore node positions programmatically. See wiki for details.

Other features: This package also contains a very simple function, adj2pajek2.m, to convert an adjacency matrix to the pajek file format, based on a similar function originally written by Gergana Bounova. (Pajek is a windows-based graph layout program which has a GUI, and might be preferable to graphviz for some users, especially ones without Matlab 7.6.)

Older Versions: This is a new version of the Graphlayout package stored on MATLAB Central.

graphviz4matlab's People

Contributors

murphyk avatar ido avatar meyer89 avatar

Watchers

曹明伟,Mingwei Cao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.