如何将y标签添加到dendextend生成的树状图中?例如,这可以用来标记“成对距离”。
水平(ggplot(horiz = T))树状图怎么样?
发布于 2018-11-07 07:14:57
必须在主题中指定axis.title.y才能显示文本。例如:
dend %>%
ggplot() +
labs(y = "Pairwise Euclidean Distance") +
theme(axis.title.y = element_text(angle = 90))对于水平树状图,y被指定为labs(),但现在我们需要在theme()中使用axis.title.x。我只能通过指定color = "black"来获取要显示的文本。不知道为什么。
dend %>%
ggplot() +
labs(y = "Pairwise Euclidean Distance") +
theme(axis.title.x = element_text(color = "black"))https://stackoverflow.com/questions/53181499
复制相似问题