From: Chuck Cleland <ccleland_at_optonline.net>

Date: Thu 18 May 2006 - 23:40:29 EST

*>
*

> You need to print the plot - something like this:

*>
*

*> <<echo=FALSE,results=hide>>=
*

*>
*

*> library(nlme)
*

*>
*

*> fm1 <- lme(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary)
*

*>
*

*> trellis.device(color=FALSE)
*

*>
*

*> @
*

*>
*

*> \begin{figure}
*

*> \centering
*

*> <<fig=TRUE,width=11,height=5>>=
*

*>
*

*> print(plot(ACF(fm1, maxLag = 10), alpha = 0.01))
*

*>
*

*> @
*

*>
*

*> \end{figure}
*

*> \begin{center}
*

*> \end{center}
*

*>
*

*>
*

Date: Thu 18 May 2006 - 23:40:29 EST

Actually, based on a post by Deepayan Sarkar (http://finzi.psych.upenn.edu/R/Rhelp02a/archive/49615.html), this seems to be the way to get an all black and white plot:

<<echo=FALSE,results=hide>>=

library(lattice)

ltheme <- canonical.theme(color = FALSE) ## in-built B&W theme
lattice.options(default.theme = ltheme) ## set as default

library(nlme)

fm1 <- lme(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary)

@

\begin{figure}

\centering

<<fig=TRUE,width=11,height=5>>=

print(plot(ACF(fm1, maxLag = 10), alpha = 0.01))

@

\end{figure} \begin{center} \end{center}

Chuck Cleland wrote:

> Roger Schürch wrote:

>> Dear R-help list >> >> I have problems setting parameters for the autocorrelation function plot. I >> would like to Sweave a document with an ACF plot. Firstly the plot does not >> show in my document (the eps file seems to be corrupted), and secondly I >> would like to have it strictly black and white (like in Pinheiro & Bates, p. >> 242). >> >> I tried the following: >> >>> plot( ACF(myModel), alpha = 0.05, bg = "white", ci.col = "black", >> col="black") >> >> R does not complain, but does not set the parameters either. Any idea what I >> am doing wrong?

> You need to print the plot - something like this:

>> Cheers >> Roger >> >> ______________________________________________ >> R-help@stat.math.ethz.ch mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >>

-- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.htmlReceived on Thu May 18 23:45:14 2006

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.1.8, at Fri 19 May 2006 - 00:10:12 EST.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*