I\'m using this function for some quick and easy sparklines
with R but I can\'t seem to work out how to change the font size to avoid ugly overlaps of the y-axi
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))