Try something like this:
library(tidyverse)
data(iris)
## create a grid with variable combinations
var <- iris %>%
select(everything(), -Species) %>%
names() %>%
expand.grid(x = ., y =., stringsAsFactors = F)
##create plotting function
plot_data <- function(data, x, y){
ggplot(data, aes_string(x, y)) +
geom_point() +
ggtitle(paste(x, "vs", y))
}
map2(.x = var$x,
.y = variables$y,
.f = ~ plot_data(iris, .x, .y))