Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Add example of graph with labeled edges #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ nil

![](https://dl.dropboxusercontent.com/u/174179/rhizome/example_graph.png)

And an example with labeled edges:

```clj
> (def g-edges
{:a {:b :makes
:c :takes}
:b {:c :takes}
:c {:a :makes}})
#'g-edges
> (view-graph (keys g) g
:node->descriptor (fn [n] {:label n})
:edge->descriptor (fn [src dst] {:label (dst (src g-edges))}))
```

Clusters are a way of grouping certain nodes together. They can be any object you like, including values also used by a node. Using `:cluster->parent`, they can be nested:

```clj
Expand Down