Hi all:
I met a question about the output of plot.
I want to output 3 plots.
Method1: by function histogram{lattice}
Method2: by function hist{graphics} 


But method1 failed(the output is empty),and only method 2 works.
I can't find out the reason,and many thanks for your help.


#Method1---failed(the output is empty)
library(lattice)
for(i in 1:3)
{
x<-rnorm(10)


jpeg(paste("e:\\hist_",i,".jpeg"))
histogram(x)
dev.off()
}




#Method 2---works
for(i in 1:3)
{
x<-rnorm(10)


jpeg(paste("e:\\hist_",i,".jpeg"))
hist(x)
dev.off()
}




Many thanks.
My best
        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to