How to increase font size in a plot in R?

前端 未结 7 1418
小鲜肉
小鲜肉 2020-11-28 01:21

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

For example

x <- rnorm(100)
h         


        
7条回答
  •  不知归路
    2020-11-28 02:06

    In case you want to increase the font of the labels of the histogram when setting labels=TRUE

    bp=hist(values, labels = FALSE, 
     main='Histogram',
     xlab='xlab',ylab='ylab',  cex.main=2, cex.lab=2,cex.axis=2)
    
    text(x=bp$mids, y=bp$counts, labels=bp$counts ,cex=2,pos=3)
    

提交回复
热议问题