Hi LiGang,

When using xyplot in a loop you need to add the print command. This should
work:

for(ind in 1:10){
jpeg(paste((1:10)[ind],".jpeg",sep=""))
print(xyplot(lat ~ long | Depth, data = quakes))
dev.off()
}

Cheers,
Artur Veloso

On Tue, Sep 2, 2008 at 12:54 AM, LiGang <luzifer.li@gmail.com> wrote:

> Hi,there,
>
> I ran into some problems when using Graphics Devices functions combined
> with
> "xyplot" function from "lattice" package.
>
>
> =============================================
> data(quakes)
> Depth <- equal.count(quakes$depth, number=8, overlap=.1)
>
>
> jpeg("3.jpeg")
> xyplot(lat ~ long | Depth, data = quakes)
> dev.off()
> ###it's ok
>
>
>
> for(ind in 1:10){
> jpeg(paste((1:10)[ind],".jpeg",sep=""))
> xyplot(lat ~ long | Depth, data = quakes)
> dev.off()
> }
>
> ###does not work, all jpeg files are empty.
>
> =============================================
>
> any suggestions?
>
> ---
> LiGang
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

