Skip to content

Commit

Permalink
doc(yahoo#13): sample code to plot workflow diagram in intro
Browse files Browse the repository at this point in the history
  • Loading branch information
ankostis committed Sep 29, 2019
1 parent f58d148 commit 1c0743a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@ print(out)

As you can see, any function can be used as an operation in GraphKit, even ones imported from system modules!

As a debug aid, you may plot the workflow with one of these methods:

```python
graph.net.plot(show=True) # open a matplotlib window
graph.net.plot("path/to/workflow.png") # supported files: .png .dot .jpg .jpeg .pdf .svg
```

> `graphviz` must be in your PATH, and `pydot` & `matplotlib` python packages installed.
> You may install both when installing *graphkit* with its `plot` extras:
> ```python
> pip install graphkit[plot]
> ```
# License
Code licensed under the Apache License, Version 2.0 license. See LICENSE file for terms.
12 changes: 12 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@ Here's a Python script with an example GraphKit computation graph that produces

As you can see, any function can be used as an operation in GraphKit, even ones imported from system modules!

As a debug aid, you may plot the workflow with one of these methods::

graph.net.plot(show=True) # open a matplotlib window
graph.net.plot("path/to/workflow.png") # supported files: .png .dot .jpg .jpeg .pdf .svg

.. NOTE::
`graphviz` must be in your PATH, and `pydot` & `matplotlib` python packages installed.
You may install both when installing *graphkit* with its `plot` extras::
pip install graphkit[plot]


License
-------

Expand Down

0 comments on commit 1c0743a

Please sign in to comment.