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:
>
> <<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}
>
>> Cheers
>> Roger
>>
>> ______________________________________________
>> R-help at 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