Displaying 3 results from an estimated 3 matches for "branches_lty".
2015 May 18
2
A "bug" in plot.dendrogram - can't plot lty with character color
...pes.
This e-mail includes an example, and what I think a solution might be.
Reproducible example:
=================
install.packages('dendextend')
library('dendextend')
dend <- 1:2 %>% dist %>% hclust %>% as.dendrogram
plot(dend) # works fine
dend %>% set("branches_lty", 1:2) %>% plot # works fine
dend %>% set("branches_col", 1:2) %>% plot # works fine
dend %>% set("branches_col", as.character(1:2)) %>% plot # works fine
# Fails:
dend %>% set("branches_lty", 1:2) %>% set("branches_col",
as.characte...
2015 May 20
0
Probably a "bug" in the dendextend package
...ution might be.
> Reproducible example:
> =================
> install.packages('dendextend')
> library('dendextend')
> dend <- 1:2 %>% dist %>% hclust %>% as.dendrogram
> plot(dend) # works fine
> dend %>% set("branches_lty", 1:2) %>% plot # works fine
> dend %>% set("branches_col", 1:2) %>% plot # works fine
> dend %>% set("branches_col", as.character(1:2)) %>% plot # works fine
> # Fails:
> dend %>% set("branches_lty", 1:2) %>% set(&...
2016 Apr 17
0
use hjust or vjust with dendextend
...; from Tal Galili, I applied this
code on iris data:
##
library(dendextend)
library(dendextendRcpp)
library(ggplot2)
dend2 <- iris[1:30,-5] %>% dist %>% hclust %>% as.dendrogram %>%
set("branches_k_color", k=3) %>% set("branches_lwd", rep(1,4)) %>%
set("branches_lty", rep(1,6)) %>% set("labels_colors") %>%
set("labels_cex", c(1.0,1.0)) %>% set("nodes_pch", 19) %>%
set("nodes_col", c("orange", "black", "plum", NA))
ggd2 <- as.ggdend(dend2)
ggplot(ggd2, horiz = TRUE, t...