Skip to content

Commit 56bfbab

Browse files
authored
Merge pull request #43 from JuliaGraphs/hw/supportgraphs
add compat for Graphs.jl objects
2 parents f1b3f76 + 88b727d commit 56bfbab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/NetworkLayout.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ function __init__()
9494
LayoutIterator(l, LightGraphs.adjacency_matrix(g))
9595
end
9696
end
97+
@require Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" begin
98+
function layout(l::AbstractLayout, g::Graphs.AbstractGraph)
99+
layout(l, Graphs.adjacency_matrix(g))
100+
end
101+
function LayoutIterator(l::IterativeLayout, g::Graphs.AbstractGraph)
102+
LayoutIterator(l, Graphs.adjacency_matrix(g))
103+
end
104+
end
97105
end
98106

99107
"""

0 commit comments

Comments
 (0)