dendextend
dendextend copied to clipboard
Can I remove tip labels from tanglegram?
Is is possible to have no tip labels when plotting a tanglegram?
There is no official parameter, but this can be done using the margin_inner
parameter.
Here is an example:
## Not run:
set.seed(23235)
ss <- sample(1:150, 10 )
dend1 <- iris[ss,-5] %>% dist %>% hclust("com") %>% as.dendrogram
dend2 <- iris[ss,-5] %>% dist %>% hclust("sin") %>% as.dendrogram
dend12 <- dendlist(dend1, dend2)
dend12 %>% tanglegram
tanglegram(dend1 , dend2, margin_inner = 0.5)
Thanks Tal.
Only got about to trying this out lately and margin_inner = 0.5
does not work, but dLeaf=1
worked for me.
Could you please share the fig you got and the sessionInfo() ?
The is similar as above Ill try to make a reproducible example later. but for sessionInfo() gives: Ive a few other phylo packages in my session.
R version 3.4.0 (2017-04-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] data.table_1.10.4 plyr_1.8.4 dplyr_0.7.1 gtools_3.5.0
[5] tidyr_0.6.3 DECIPHER_2.4.0 RSQLite_2.0 Biostrings_2.44.1
[9] XVector_0.16.0 IRanges_2.10.2 S4Vectors_0.14.3 BiocGenerics_0.22.0
[13] dendextend_1.5.2 phangorn_2.2.0 ape_4.1 ggtree_1.8.1
[17] treeio_1.0.2 ggplot2_2.2.1
loaded via a namespace (and not attached):
[1] mclust_5.3 Rcpp_0.12.11 mvtnorm_1.0-6 lattice_0.20-35 class_7.3-14
[6] assertthat_0.2.0 digest_0.6.12 R6_2.2.2 zlibbioc_1.22.0 rlang_0.1.1
[11] lazyeval_0.2.0 diptest_0.75-7 whisker_0.3-2 blob_1.1.0 kernlab_0.9-25
[16] Matrix_1.2-9 labeling_0.3 igraph_1.0.1 bit_1.1-12 munsell_0.4.3
[21] compiler_3.4.0 pkgconfig_2.0.1 nnet_7.3-12 tibble_1.3.3 gridExtra_2.2.1
[26] quadprog_1.5-5 viridisLite_0.2.0 MASS_7.3-47 grid_3.4.0 nlme_3.1-131
[31] jsonlite_1.5 gtable_0.2.0 DBI_0.7 magrittr_1.5 scales_0.4.1
[36] viridis_0.4.0 flexmix_2.3-14 bindrcpp_0.2 robustbase_0.92-7 rvcheck_0.0.8
[41] fastmatch_1.1-0 tools_3.4.0 fpc_2.1-10 bit64_0.9-7 glue_1.1.1
[46] trimcluster_0.1-2 DEoptimR_1.0-8 colorspace_1.3-2 cluster_2.0.6 prabclus_2.2-6
[51] memoise_1.1.0 bindr_0.1 modeltools_0.2-21
Thanks, I see you're using the latest dendextend version. A reproducible example will help. I can also think of adding a "show_labels" parameter to control this more directly. Once you get the example ready, I'll add this feature and we can see how it looks.
Cheers, Tal