Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spacing Between Clusters #183

Open
Stillerman opened this issue May 31, 2020 · 3 comments
Open

Spacing Between Clusters #183

Stillerman opened this issue May 31, 2020 · 3 comments
Labels
comp/cluster Issue of cluster component kind/feature New feature or request

Comments

@Stillerman
Copy link

Screen Shot 2020-05-31 at 9 34 56 AM

At the top of the diagram the spacing is perfect, but it gets cramped towards the bottom. Is there a way to spread them out?

@mingrammer mingrammer added comp/cluster Issue of cluster component kind/feature New feature or request labels Jun 4, 2020
@clayms
Copy link

clayms commented Nov 5, 2020

See if something from this answer can be adapted to suit your needs.

#17 (comment)

@clayms
Copy link

clayms commented Nov 5, 2020

@Stillerman
Also, the spacing between the top row clusters, and the third row clusters are they way they are because of the intervening node outside of any cluster. If that intervening node was removed, the cluster spacing would be the same as the spacing between the lower clusters.

@clayms
Copy link

clayms commented Nov 5, 2020

See if the following will work for you:

from diagrams import Diagram, Cluster, Node, Edge

with Diagram("Cluster Spacing", show=False, direction="TB") as diag:
    with Cluster("top0"):
        A = Node("", shape="house")
    with Cluster("bot0"):
        B = Node("", shape="cds")
    with Cluster("top1"):
        C = Node("", shape="star")
    with Cluster("bot1"):
        D = Node("", shape="triangle")    
    with Cluster("top2"):
        E = Node("", shape="hexagon")
    with Cluster("bot2"):
        F = Node("", shape="Mdiamond")    

    A >> Edge(minlen="1") >> B
    C >> Edge(minlen="2") >> D 
    E >> Edge(minlen="3") >> F

diag

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp/cluster Issue of cluster component kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants