如何防止标签在图表的 Edge() 中与箭头重叠 - class

How to prevent labels from overlapping arrows in diagrams' Edge() - class

在使用 diagrams as code Python library 时,如何防止文本与屏幕截图中的箭头重叠?

from diagrams import Cluster, Diagram, Edge
...

with Diagram("Clustered Web Services",
             show=False,
             graph_attr={
                 'pad': '0.1',
                 'bgcolor': 'transparent'
             }) as diag:

    ...
    
    with Cluster("AWS"):
        with Cluster("Pipeline"):
            ....

        with Cluster("S3 Storage"):
            ...
    # PLOT
    ...
    lambda_main >> Edge(label="Storing filtered & prioritized suggestions",
                        style="bold",
                        color="black") >> s3_bucket_full
    ...

我发现在很多情况下,在 Edge(..)[ 中使用 xlabel 而不仅仅是 label =15=] 帮助解决问题。