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

Dendrogram layout fails with error "object 'direction' not found" #81

Closed
atheriel opened this issue Aug 21, 2017 · 1 comment
Closed

Comments

@atheriel
Copy link

This is a more general version of the errors reported in #72 and #79.

The code (verbatim from several examples)

fgraph <- igraph::graph_from_data_frame(flare$edges, vertices = flare$vertices)
ggraph(fgraph, layout = "dendrogram") +
  geom_edge_elbow()

fails with (as in #72):

Error in eval(expr, envir, enclos) : object 'direction' not found

Passing e.g. direction = "out" in either ggraph() or in geom_edge_elbow itself yields the same error. Wrapping it in an aes() call, e.g.

ggraph(fgraph, layout = "dendrogram") +
  geom_edge_elbow(aes(direction = "out"))

emits the warning (as in #79)

Warning message:
Removed 251 rows containing non-finite values (stat_edge_elbow).

and draws an empty plot.

thomasp85 added a commit that referenced this issue Jan 10, 2018
* Use tidygraph as the central data format. The results of this are several:

  - All graph object supported by tidygraph are now supported on even footing in
    ggraph. All layouts are now available to any graph class
  - **BREAKING** The `"even"` layout for dendrograms are no more, but can be
    obtained by using the `"dendrogram"` layout with `height = NULL`
  - **BREAKING** All layouts uses NSE for arguments that refer to node and edge
    variables, instead of passing in strings that refer to the variable name.
  - All examples and vignettes now uses tidygraph for graph manipulation 
    resulting in much cleaner code.
  - `tree_apply` has been deprecated in favour of using `tidygraph::map_bfs_*`
  - `geom_edge_elbow` is no longer only available to dendrogram objects
  - tidygraph algorithms can now be used directly within ggraph functions. E.g.
    you can have `sort.by = node_rank_hclust()` in your specification of a 
    linear layout, or `aes(colour = group_infomap())` in node geoms
  
  This big change fixes #21, #72, #79, and #81
@thomasp85
Copy link
Owner

Fixed in 36fc2a9

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