Closed clpippel closed 2 years ago
The functions below also produce warnings:
g <- make_empty_graph()
g |> plot(layout=component_wise)
g |> plot(layout=layout_as_bipartite)
g |> plot(layout=layout_as_star)
g |> plot(layout=layout_with_gem)
g |> plot(layout=layout_with_kk)
g |> plot(layout=layout_with_lgl)
g |> plot(layout=layout_with_mds)
g |> plot(layout=layout_with_sugiyama)
g |> plot(layout=layout_)
g |> plot(layout=merge_coords)
g |> plot(layout=norm_coords)
g |> plot(layout=normalize)
I've updated your comment above to remove redundant (duplicate) entries. As for the rest:
component_wise()
and normalize()
are layout modifiers, not layouts, so they are not meant to be used this way.merge_coords()
, norm_coords()
and layout_()
are not layout functions either.layout_as_bipartite()
prints an error saying that the graph is not bipartite, which is correct (it needs a type
vertex attribute, even if the graph has no vertices).layout_as_star()
prints an error, which is in some sense correct as you need a center vertex for a star layout and there are no vertices, so we cannot produce a star layout. Nevertheless, we should probably just special-case it and return an empty matrix.layout_as_tree()
, layout_with_gem()
, layout_with_kk()
and layout_with_sugiyama()
are fixed in 8bdb4627layout_with_lgl()
and layout_with_mds()
have to be fixed in the C core; fixed in the C core now in https://github.com/igraph/igraph/commit/17d3cbeafa16758964c1d0732a0ac0daaf081347 , https://github.com/igraph/igraph/commit/a4ff2b3a0aacf8d752262072d383a9d9f7f5bfdf and https://github.com/igraph/igraph/commit/fb778eef25def547bb053023b72d0e56b4c1aaed3bd98f43 fixes layout_as_star()
, updates the C core to fix layout_with_lgl()
and layout_with_mds()
, and adds test to validate that these functions print no warnings for a null graph.
Describe the bug layout_as_tree does not check for empty graph.
To reproduce
make_empty_graph() |> plot(layout=layout_as_tree)
produces warning:
If you are confident that the issue is not in the R interface but in the C core of igraph, please add it to the main igraph repo instead.
If you are unsure, feel free to add your issue here - we will transfer it to the main igraph repo if the root cause is in the C core of igraph.
Version information
[1] igraph_1.3.4