for (i in unique(iris$Species)) { cat(paste("##",i,"\n\n")) print( ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width))+ geom_point() ) cat("\n\n\n") }