File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -329,11 +329,13 @@ The `vertex_order` can be a vector or one of the following inputs
329329embed_graph (g:: SimpleGraph ; vertex_order= Branching ()) = embed_graph (UnWeighted (), g; vertex_order)
330330function embed_graph (mode, g:: SimpleGraph ; vertex_order= Branching ())
331331 if vertex_order isa AbstractVector
332- L = PathDecomposition. Layout (g, collect (vertex_order))
332+ L = PathDecomposition. Layout (g, collect (vertex_order[ end : - 1 : 1 ] ))
333333 else
334334 L = pathwidth (g, vertex_order)
335335 end
336- ug = ugrid (mode, g, L. vertices; padding= 2 , nrow= L. vsep+ 1 )
336+ # we reverse the vertex order of the pathwidth result,
337+ # because this order corresponds to the vertex-seperation.
338+ ug = ugrid (mode, g, L. vertices[end : - 1 : 1 ]; padding= 2 , nrow= L. vsep+ 1 )
337339 return ug
338340end
339341
You can’t perform that action at this time.
0 commit comments