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

stat_edge_elbow do not render anything #79

Closed
sam217pa opened this issue Jul 27, 2017 · 1 comment
Closed

stat_edge_elbow do not render anything #79

sam217pa opened this issue Jul 27, 2017 · 1 comment

Comments

@sam217pa
Copy link

Using geom_edge_elbow() according to the vignette does not work as expected on my setup.
Any idea why it is so ? I would like to use ggraph to make a "classical" dendrogram with right angles.

Minimal not-working example :

dendrogram <- as.dendrogram(hclust(dist(iris[, 1:4])))
ggraph(dendrogram, 'dendrogram') + geom_edge_elbow()

It gives me the warning:

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

sessionInfo() prints out:

R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] bindrcpp_0.2    igraph_1.0.1    ggraph_1.0.0    tidygraph_1.0.0 dplyr_0.7.1     purrr_0.2.2.2   readr_1.1.1     tidyr_0.6.3     tibble_1.3.3    ggplot2_2.2.1   tidyverse_1.1.1

loaded via a namespace (and not attached):
 [1] reshape2_1.4.2    haven_1.1.0       lattice_0.20-35   colorspace_1.3-2  viridisLite_0.2.0 rlang_0.1.1       foreign_0.8-69    glue_1.1.1        tweenr_0.1.5      modelr_0.1.0     
[11] readxl_1.0.0      bindr_0.1         plyr_1.8.4        stringr_1.2.0     munsell_0.4.3     gtable_0.2.0      cellranger_1.1.0  rvest_0.3.2       psych_1.7.5       labeling_0.3     
[21] forcats_0.2.0     parallel_3.4.1    broom_0.4.2       Rcpp_0.12.12      udunits2_0.13     scales_0.4.1      jsonlite_1.5      gridExtra_2.2.1   mnormt_1.5-5      ggforce_0.1.1    
[31] hms_0.3           digest_0.6.12     stringi_1.1.5     ggrepel_0.6.5     grid_3.4.1        tools_3.4.1       magrittr_1.5      lazyeval_0.2.0    pkgconfig_2.0.1   MASS_7.3-47      
[41] xml2_1.1.1        lubridate_1.6.0   assertthat_0.2.0  httr_1.2.1        viridis_0.4.0     R6_2.2.2          units_0.4-5       nlme_3.1-131      compiler_3.4.1

When I use it on my data, clustered with hclust and dist with default parameters, it gives me "object 'direction' not found.

Thanks for your great work on ggraph otherwise !

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