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

ggdend / ggplotly - space the labels a bit #66

Open
talgalili opened this issue Feb 10, 2018 · 0 comments
Open

ggdend / ggplotly - space the labels a bit #66

talgalili opened this issue Feb 10, 2018 · 0 comments

Comments

@talgalili
Copy link
Owner

This looks a bit worse than the based graphics version:

image


library(dendextend)
# library(ggdendro)
# Create a complex dend:
dend <- iris[1:30,-5] %>% dist %>% hclust %>% as.dendrogram %>% 
   set("branches_k_color", k=3) %>% set("branches_lwd", c(1.5,1,1.5)) %>% 
   set("branches_lty", c(1,1,3,1,1,2)) %>%  
   set("labels_colors") %>% set("labels_cex", c(.9,1.2)) 
# plot the dend in usual "base" plotting engine:   
plot(dend)
# Now let's do it in ggplot2 :)
ggd1 <- as.ggdend(dend)
library(ggplot2)
ggplot(ggd1) # reproducing the above plot in ggplot2 :)

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

1 participant