R YaleToolkit: How to change the font size of tick labels on the sparklines?

筅森魡賤 提交于 2019-11-30 00:23:49

Well, sparklines are heavily dependant on grid package, so you need to dig deep to search for those font size parameters. Playing with viewpoint will probably get you there. For an easy (but VERY 'raw') solution, just use simple plotting options using par - this way you can manipulate almost every parameter very easily:

 x <- data.frame(V = rnorm(1000), W = rnorm(1000), X = rnorm(1000),
      Y = rnorm(1000), Z = rnorm(10))
 par(mfrow=c(5,1),mar=c(1,0,0,0),oma=c(4,5,4,4))
 plot(x$V,axes=F,ylab="",xlab="",main="",type="l");axis(2,cex.axis=0.7)
 plot(x$W,axes=F,ylab="",xlab="",main="",type="l");axis(2,cex.axis=0.7)
 plot(x$X,axes=F,ylab="",xlab="",main="",type="l");axis(2,cex.axis=0.7)
 plot(x$Y,axes=F,ylab="",xlab="",main="",type="l");axis(2,cex.axis=0.7)
 plot(x$Z,axes=F,ylab="",xlab="",main="",type="l");axis(2,cex.axis=0.7)
 axis(1,pos=c(-2))

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!