-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Sometimes, I want to create a small separation between nodes and edges when plotting a graph, while keeping an outline around my nodes. Currently, I am using a workaround like this:
f = Figure()
ax = Axis(f[1, 1])
g = cycle_digraph(3)
# get fixed layout
coords = GraphMakie.NetworkLayout.Spring()(g)
# draw edges with large, white nodes
graphplot!(ax, g; node_color = (:white, 1), arrow_shift = :end, node_size = 60, arrow_size = 20, layout = coords)
# draw nodes on top
graphplot!(ax, g; node_size = 20, arrow_size = 0, edge_width = 0, layout = coords)
hidedecorations!(ax)
hidespines!(ax)
ax.aspect = DataAspect()
fThis works well enough, but the illusion breaks down quickly once there are things in the background of the plot, which the white nodes are overlapping with.
Would it make sense to add a outset or node_outset parameter to graphplot which shifts the endpoints of incoming and outgoing edges by some amount?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
