如何更改R图的标签大小 [英] How to change the label size of an R plot

查看:353
本文介绍了如何更改R图的标签大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在根据自己的数据绘制聚类图.我已经完成了整个绘图,但是我的标签文字很大,以便能够正确读取该绘图.任何人都知道如何缩小标签.

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.

我正在使用软件包"sparcl",我的功能是:

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)

如您所见,分支文本很大,并且彼此重叠.我希望叶子的文字小25%.我已经看过Sparcl软件包的文档,但这似乎行不通.

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.

推荐答案

在调用绘图之前,您应该调用par().

before calling the plot you should call par().

par(cex=numericvalue)
ColorDendrogram(parameters)

这篇关于如何更改R图的标签大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆