Displaying 2 results from an estimated 2 matches for "branches_col".
2015 May 18
2
A "bug" in plot.dendrogram - can't plot lty with character color
...ht 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.character(1:2)) %>% plot
### Error:
# Error in segments(x0, y0, x1, y1, col...
2015 May 20
0
Probably a "bug" in the dendextend package
...gt; 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.character(1:2)) %>% plot
> ### Er...