瀏覽代碼

docs: add guide for jupyter notebook

pull/46/head
mingrammer 4 年之前
父節點
當前提交
847cf46395
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. +13
    -0
      docs/guides/diagram.md

+ 13
- 0
docs/guides/diagram.md 查看文件

@@ -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**.


Loading…
取消
儲存