How to change the label size of an R plot

六月ゝ 毕业季﹏ 提交于 2019-12-13 01:26:12

问题


I`m making a cluster plot from my data. I have the entire plot finished but my label text is to large to be able to properly read the plot. Anyone any idea how to make labels smaller.

I am using the package "sparcl", and my function is:

ColorDendrogram(fit,y=col.int, main = "Clusters from 216 samples",
                branchlength = 0.20, labels = fit$labels, xlab = NULL,
                sub = NULL, ylab = "", cex.main = NULL)

as you can see the branch text is to big and they fall over each other. I want the text of the leaves to be 25% smaller. I already looked at the documentation of the Sparcl package but that doesn't seem to work.


回答1:


before calling the plot you should call par().

par(cex=numericvalue)
ColorDendrogram(parameters)



回答2:


Have you tried giving cex.main a value? (The amount by which to enlarge the main title for the figure)



来源:https://stackoverflow.com/questions/13046323/how-to-change-the-label-size-of-an-r-plot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!