I'm building a ggplot wrapper function to use for multiple plots. Now I get this error which I don't understand.

This is my function:

```
library(tidyverse)

plot_hist_trend <- function(df, title, subtitle = "", x_axis, y_axis, point_color) {
  df %>%
   ggplot(aes(x_axis, y_axis)) +
    geom_smooth(color = "black") +
    geom_point(color = point_color) +
    theme(legend.position = "right") +
    labs(title = title,
         subtitle = subtitle,
         x = "",
         y = "",
         caption = "Data: NOAA")
}

```

This is a subset of my dataframe.

```
df <- structure(list(year = c(2018L, 2017L, 2016L, 2015L, 2014L), n = c(52L, 
53L, 47L, 47L, 55L)), .Names = c("year", "n"), row.names = c(NA, 
-5L), class = c("tbl_df", "tbl", "data.frame"))

```

...but when I plot my ggplot2 object I run into this `1d atomic vector or list` error.

```
plot_hist_trend(df, title = "Title",
                  x_axis = year, y_axis = n,
                  point_color = "#D0021B")

```

Tnx in advance!