R/make_dist_plot.R

Defines functions make_dist_plot

Documented in make_dist_plot

#' @title
#' @return
#' @export
#' @importFrom ggplot2 ggplot aes
#' labs geom_histogram
#' @importFrom glue glue
make_dist_plot <- function(data, scale, xaxis) {
  {{ data }} %>%
    ggplot(aes(x = {{ scale }})) +
    geom_histogram(
      binwidth = 0.5,
      fill = "#2a6ebb"
    ) +
    labs(
      y = "Count",
      x = glue::glue("{xaxis}")
    )
}
awconway/nc-mscs documentation built on Feb. 17, 2021, 10:07 p.m.