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

buchheim layout overlaping #60

Closed
zvnkk opened this issue Nov 15, 2023 · 2 comments
Closed

buchheim layout overlaping #60

zvnkk opened this issue Nov 15, 2023 · 2 comments

Comments

@zvnkk
Copy link

zvnkk commented Nov 15, 2023

I m using GraphRecipies for plotting given Buchheim layout the output as method parameter is the following
image
how to make graph non-overlaping, i could not find any parameter for this ? (there is :nodesize parameter for layout_kw but this does nothing )

please help
the thing is that for node weight parameters i have 0 and that is causing the conflict

@hexaeder
Copy link
Collaborator

GraphRecipes uses the nodeweight to forward it to node size:

https://github.com/JuliaPlots/GraphRecipes.jl/blob/f2d932900febcf0d89851567fba52927164d1591/src/graph_layouts.jl#L284-L286

so don't set it to 0 then? Because 0 nodesize will lead to those results:

using Graphs, GraphMakie, GLMakie, NetworkLayout
g = SimpleDiGraph(16)
add_edge!(g, 1, 2)
add_edge!(g, 1, 3)
add_edge!(g, 2, 4)
add_edge!(g, 2, 5)
add_edge!(g, 2, 6)
add_edge!(g, 3, 7)
add_edge!(g, 3, 8)
add_edge!(g, 4, 9)
add_edge!(g, 5, 10)
add_edge!(g, 6, 11)
add_edge!(g, 7, 12)
add_edge!(g, 7, 13)
add_edge!(g, 8, 14)
add_edge!(g, 12, 15)
add_edge!(g, 13, 16)

graphplot(g, layout=Buchheim())

grafik

graphplot(g, layout=Buchheim(;nodesize=Float64[0 for i in 1:16]))

grafik

@zvnkk
Copy link
Author

zvnkk commented Nov 16, 2023

Thanks for the feedback, figured everything out.

@zvnkk zvnkk closed this as completed Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants