Put column names of a data frame as the title of plots of each column

Viewed 7715

I have a data frame with 36 columns and more than 3000 rows. I am using plot function inside a for loop to plot graphs of each column. I want the title of the graph to appear as column name. How can I do that?

for(i in c(1:36)){
  plot(DowData[,i],type="l",main="colnames(DowData)[i]")
}
2 Answers
Related