search for: printloop

Displaying 1 result from an estimated 1 matches for "printloop".

Did you mean: printlog
2010 Sep 24
1
color of lines while printing through for loop
...lim = c(pheno.dt$year[1],pheno.dt$year[nrow(pheno.dt)]), ylim = c(min(pheno.dt$julian, na.rm = TRUE),max(pheno.dt$julian, na.rm = TRUE)), xlab = "Year", ylab = "Julian Day") ###setting up colors sp_pheno.unique <- unique(pheno.dt$sp_pheno) colors <- seq(1,200,1) ####printloop for (i in 1:length(unique(pheno.dt$year))) { data.sub <- subset(pheno.dt, pheno.dt$sp_pheno==sp_pheno.unique[i]) x <- seq(pheno.dt$year[1],pheno.dt$year[nrow(pheno.dt)]) y <- data.sub$julian lines(x,y, col = colors[i]) }