|
|
@ -51,3 +51,19 @@ with Diagram("Simple Diagram", show=False):
|
|
|
|
EC2("web")
|
|
|
|
EC2("web")
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If you are familiar with Graphviz, you can customize the diagrams with Graphviz attribute config options.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
> `graph_attr`, `node_attr` and `edge_attr` are allowed. Here is a [reference link](https://www.graphviz.org/doc/info/attrs.html).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```python
|
|
|
|
|
|
|
|
from diagrams import Diagram
|
|
|
|
|
|
|
|
from diagrams.aws.compute import EC2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
graph_attr = {
|
|
|
|
|
|
|
|
"fontsize": 45,
|
|
|
|
|
|
|
|
"bgcolor": "transparent"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with Diagram("Simple Diagram", show=False, graph_attr=graph_attr):
|
|
|
|
|
|
|
|
EC2("web")
|
|
|
|
|
|
|
|
```
|
|
|
|