Hello all, I found a funny problem with y-axis labels when plotting acf(matrix) - the labels are too close to one of the margins and cut in half. Here's the problem: test<-matrix(rnorm(200),ncol=4) acf(test) This doesn't fix the problem: test<-matrix(rnorm(200),ncol=4) par(mar=c(3,3,2,0.2),oma=c(0,0,0,0)) acf(test) This does fix the margin. I understand why, but not sure why ONLY this will work? test<-matrix(rnorm(200),ncol=4) acf(test,mar=c(3,3,2,0.2),oma=c(0,0,0,0)) ______ Win xp sp3,> R.version.string[1] "R version 2.14.1 (2011-12-22)">Thanks Michael Folkes [[alternative HTML version deleted]]
On 02/03/2012 11:40 AM, Folkes, Michael wrote:> Hello all, > I found a funny problem with y-axis labels when plotting acf(matrix) - > the labels are too close to one of the margins and cut in half. > Here's the problem: > > test<-matrix(rnorm(200),ncol=4) > acf(test) > > This doesn't fix the problem: > test<-matrix(rnorm(200),ncol=4) > par(mar=c(3,3,2,0.2),oma=c(0,0,0,0)) > acf(test) > > This does fix the margin. I understand why, but not sure why ONLY this > will work? > test<-matrix(rnorm(200),ncol=4) > acf(test,mar=c(3,3,2,0.2),oma=c(0,0,0,0))acf uses plot.acf to do the plotting. If you read ?plot.acf, you'll see how it comes up with acf settings: the global ones are overridden for data like yours. You might want to do some experimenting and suggest better defaults for plot.acf. Duncan Murdoch
Reasonably Related Threads
- graphical parameters and acf
- Need a little help setting the upper median using "layout"...
- lattice: passing multiple lty values to the key/legend
- Newbie trying to understand $ so I can understand acf function in stats
- When using ACF, receive error: no applicable method for 'ACF' applied to an object of class "c('double', 'numeric')"