https://github.com/juliagraphs/graphviz.jl
Julia Binding to the GraphViz library
https://github.com/juliagraphs/graphviz.jl
Last synced: 4 months ago
JSON representation
Julia Binding to the GraphViz library
- Host: GitHub
- URL: https://github.com/juliagraphs/graphviz.jl
- Owner: JuliaGraphs
- License: other
- Created: 2013-08-08T04:27:51.000Z (almost 12 years ago)
- Default Branch: main
- Last Pushed: 2022-12-02T15:13:20.000Z (over 2 years ago)
- Last Synced: 2025-02-23T12:17:19.325Z (4 months ago)
- Language: Julia
- Size: 53.7 KB
- Stars: 69
- Watchers: 8
- Forks: 21
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# GraphViz.jl
This package provides an interface to the the `GraphViz` package for graph visualization. There are two primary entry points:
- The `GraphViz.load` function (not exported) to load graphs from a file
- The `dot"""` string macro for literal inline specifications of graphsBoth of these accept `Graph` type accepts graph in [DOT](http://en.wikipedia.org/wiki/DOT_(graph_description_language)) format.
To load a graph from a non-constant string, use `GraphViz.load` with an `IOBuffer`.# 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
GraphViz.load("mygraph.dot")
dot"""
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](http://en.wikipedia.org/wiki/DOT_(graph_description_language))):```
dot"""
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];
}
"""
```