我正在尝试调整图例中各个标签之间的空格,以便我可以看到所有9个标签但不幸的是我没有成功。这是我生成箱图
的代码 # raw counts
boxplot(log2(counts+1), col = col[as.integer(group)], las = 2,
main = "Raw counts distribution", ylab = expression(log[2] ~ (raw ~ count + 1)))
legend("top", levels(group), fill=col[1:nlevels(group)], horiz=TRUE)
# norm counts
boxplot(log2(norm.counts+1), col = col[as.integer(group)], las = 2,
main = "Normalized counts distribution", ylab = expression(log[2] ~ (norm ~ count + 1)))
legend("top", levels(group), fill=col[1:nlevels(group)], horiz=TRUE)
我甚至试图像这样包含text.width
函数
# raw counts
boxplot(log2(counts+1), col = col[as.integer(group)], las = 2,
main = "Raw counts distribution", ylab = expression(log[2] ~ (raw ~ count + 1)))
legend("top", levels(group), fill=col[1:nlevels(group)], text.width = 0.2, horiz=TRUE)
# norm counts
boxplot(log2(norm.counts+1), col = col[as.integer(group)], las = 2,
main = "Normalized counts distribution", ylab = expression(log[2] ~ (norm ~ count + 1)))
legend("top", levels(group), fill=col[1:nlevels(group)], text.width = 0.2, horiz=TRUE)
但情况变得更糟。
如何调整空格以查看所有标签?