talgalili / dendextend

Extending R's Dendrogram Functionality
152 stars 29 forks source link

Make y axis label appear #89

Open jxu opened 5 years ago

jxu commented 5 years ago

Just specifying labs doesn't make the labels appear.

For me axis.title.y must be specified in a theme for the text to show up. For example:

dend %>% 
  ggplot() + 
  labs(y = "Pairwise Euclidean Distance") + 
  theme(axis.title.y = element_text(angle = 90))

For horizontal dendrograms, y is specified to labs(), but now we need axis.title.x in theme(). I could only get text to show up by specifying color = "black". Not sure why. Related #25

dend %>% 
  ggplot() + 
  labs(y = "Pairwise Euclidean Distance") + 
  theme(axis.title.x = element_text(color = "black"))