[英]How to adjust margin for axis label from hclust dendogram plot
This can be done using the mgp
argument to par
: 这可以用做
mgp
参数par
:
par(mgp=c(2, 1, 0))
plot(hc, hang = 0.5, sub="", xlab ="")
par(mgp=c(1, 1, 0))
plot(hc, hang = 0.5, sub="", xlab ="")
The other two arguments control the tick marks and the scale position so for instance: 另外两个参数控制刻度线和刻度位置,例如:
par(mgp=c(2, 3, 2))
plot(hc, hang = 0.5, sub="", xlab ="")
Maybe the use of mtext
could help 也许使用
mtext
可能有所帮助
plot(hc, hang = 0.5, sub="", xlab ="", ylab = "")
mtext(text = "test", side = 2, line = 2)
yielding this plot 产生这个阴谋
side = 2
defines the lefthand side, and line
indicates the "excentricity". side = 2
定义左侧,而line
表示“偏心”。 You can play around some more with the line
and adj
parameters (and more) like this: 您可以使用
line
和adj
参数(以及更多)来执行更多操作:
plot(hc, hang = 0.5, sub="", xlab ="", ylab = "")
mtext(text = "t2", side = 2, line = 2, col = "blue")
mtext(text = "t1", side = 2, line = 1, col = "blue")
mtext(text = "t0", side = 2, line = 0, col = "blue")
mtext(text = "tlow", side = 2, line = 0, col = "blue", adj = 0)
yielding the following plot 得出以下情节
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.