简体   繁体   中英

Plot + change font size in R

I want to reduce the label expression "hola" in this instruction:

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

How can I do this?

Use the argument cex.axis . This is a scaling value relative to 1, thus values <1 reduce the font size, and values >1 increase the font size:

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.

For instance:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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