Re: [R] histograms and for loops

2011-05-06 Thread David Winsemius
On May 6, 2011, at 1:11 PM, wwreith wrote: The following code works mostly. It runs fine but... 1. Is there a way to increment the xlab for each graph? I would like to have Graph 1, Graph 2, etc. Right now it just gives me Graph i over and over again. Use the power of bquote. See modif

Re: [R] histograms and for loops

2011-05-06 Thread Greg Snow
oject.org] On Behalf Of wwreith > Sent: Friday, May 06, 2011 11:11 AM > To: r-help@r-project.org > Subject: [R] histograms and for loops > > The following code works mostly. It runs fine but... > > 1. Is there a way to increment the xlab for each graph? I would like to > ha

Re: [R] histograms and for loops

2011-05-06 Thread vioravis
This should work!! for(i in 1:12){ xLabel <- paste("Graph",i) plotTitle <- paste("Graph",i,".jpg") jpeg(plotTitle) print(hist(zNort1[,i], freq=FALSE, xlab=xLabel, col="blue", main="Standardized Residuals Histogram", ylim=c(0,1), xlim=c(-3.0,3.0)),axes = FALSE) axis(1, col = "blue",col.axis = "bl

[R] histograms and for loops

2011-05-06 Thread wwreith
The following code works mostly. It runs fine but... 1. Is there a way to increment the xlab for each graph? I would like to have Graph 1, Graph 2, etc. Right now it just gives me Graph i over and over again. 2. Is there a way to get the x-axis and y-axis to be bold or at least a darker color?