如何在R中的图中增加字体大小? [英] How to increase font size in a plot in R?

查看:1053
本文介绍了如何在R中的图中增加字体大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很困惑.在图的标题,标签和其他位置增加文字字体大小的正确方法是什么?

I am confused. What is the right way to increase font size of text in the title, labels and other places of a plot?

例如

x <- rnorm(100)
hist(x, xlim=range(x), xlab= "Variable Label", 
     ylab="density", main="Title of plot", prob=TRUE, ps=30)

ps参数不会更改字体大小(但在?par的R帮助中说,它是用于文本的磅值(而不是符号)".

The ps argument does not change font size (but it says in R Help for ?par that it is for "the point size of text (but not symbols)".

是否还可以将更改字体大小与诸如hist之类的绘图功能分开?

Also is it possible to separate changing the font size from the plotting function such as hist?

推荐答案

您想要类似cex=1.5参数的内容来将字体缩放150%.但是请务必查看help(par),因为还有cex.labcex.axis,...

You want something like the cex=1.5 argument to scale fonts 150 percent. But do see help(par) as there are also cex.lab, cex.axis, ...

这篇关于如何在R中的图中增加字体大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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