简体   繁体   English

在R中绘制+更改字体大小

[英]Plot + change font size in R

I want to reduce the label expression "hola" in this instruction: 我想在这条指令中减少标签表达式"hola"

axis(1, at = c(32.65), labels = expression("hola")) 

How can I do this? 我怎样才能做到这一点?

Use the argument cex.axis . 使用参数cex.axis This is a scaling value relative to 1, thus values <1 reduce the font size, and values >1 increase the font size: 这是相对于1的缩放值,因此值<1减小字体大小,值>1增加字体大小:

plot(1:50)
axis(1, at = c(32.65), labels = expression("hola"), cex.axis=2)
axis(1, at = c(45), labels = expression("hola"), cex.axis=0.5)

在此输入图像描述

Use cex.axis to change the label size. 使用cex.axis更改标签大小。

For instance: 例如:

axis(1, at = c(32.65), labels = expression("hola"), cex.axis=0.8) 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM