Thanks for the advice. I guess I should have read the acf help page more thoroughly to appreciate the role of plot.acf(). Typical. Thanks Duncan.
-----Original Message----- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: March 2, 2012 9:53 AM To: Folkes, Michael Cc: r-help@r-project.org Subject: Re: [R] acf() plot of matrix cuts y-axis labels 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 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.