Skip to content

stat_edge_elbow do not render anything #79

@sam217pa

Description

@sam217pa

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 !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions