Skip to content

Commit

Permalink
docs: add guide for jupyter notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
mingrammer committed Feb 25, 2020
1 parent 113740f commit 847cf46
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/guides/diagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ $ python diagram.py

It will generate an image file with single `EC2` node drawn as `simple_diagram.png` on your working directory, and open that created image file immediately.

## Jupyter Notebooks

Diagrams can be also rendered directly inside the notebook as like this:

```python
from diagrams import Diagram
from diagrams.aws.compute import EC2

with Diagram("Simple Diagram") as diag:
EC2("web")
diag
```

## Options

You can specify the output file format with `outformat` parameter. Default is **png**.
Expand Down

0 comments on commit 847cf46

Please sign in to comment.