Code Monkey home page Code Monkey logo

graphviz.jl's Introduction

GraphViz.jl

This package provides an interface to the the GraphViz package for graph visualization. The primary export is the Graph type. The Graph type accepts graph in DOT format. You may either pass in an IO object (see the below examples) from which to read the graph or pass it in as a string or memory blob (in form of a Uint8 array). GraphViz will copy the graph so you do not need to worry about the memory being passed in.

Getting started

If you already have a graph you would like to work with, the following code snippets may be helpful. If not, have a look at the "Simple Examples" section below

using GraphViz
open(Graph,"mygraph.dot")
Graph("""
 digraph graphname {
     a -> b -> c;
     b -> d;
 }
""")

Usage

After obtaining the package through the package manager, the following suffices to load the package:

using GraphViz

Note that graphviz has many configuration options. In particular, both the Cairo and the GTK backends may be disabled by default.

Simple Examples

Try the following in an IJulia Notebook (this example is taken from here):

Graph("""
graph graphname {
     // The label attribute can be used to change the label of a node
     a [label="Foo"];
     // Here, the node shape is changed.
     b [shape=box];
     // These edges both have different line properties
     a -- b -- c [color=blue];
     b -- d [style=dotted];
 }
""")

graphviz.jl's People

Contributors

keno avatar kersulis avatar mlubin avatar staticfloat avatar waldyrious avatar

Watchers

 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.