Skip to content

Commit

Permalink
Update autoplot-density.R
Browse files Browse the repository at this point in the history
Fixes #22
  • Loading branch information
spsanderson committed Jan 20, 2022
1 parent d0accf8 commit 1fe8c77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/autoplot-density.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ tidy_autoplot <- function(.data, .plot_type = "density", .line_size = .5, .point
if(!attributes(.data)$tibble_type %in% c(
"tidy_gaussian", "tidy_poisson","tidy_gamma","tidy_beta","tidy_f",
"tidy_hypergeometric","tidy_lognormal","tidy_cauchy","tidy_chisquare",
"tidy_weibull","tidy_uniform","tidy_logistic"
"tidy_weibull","tidy_uniform","tidy_logistic","tidy_exponential"
)){
rlang::abort("The data passed must come from a `tidy_` distribution function.")
}
Expand Down Expand Up @@ -117,6 +117,8 @@ tidy_autoplot <- function(.data, .plot_type = "density", .line_size = .5, .point
paste0("Max: ", atb$.max, " - Min: ", atb$.min)
} else if(atb$tibble_type == "tidy_logistic"){
paste0("Location: ", atb$.location, " - Scale: ", atb$.scale)
} else if(atb$tibble_type == "tidy_exponential"){
paste0("Rate: ", atb$.rate)
}
)

Expand Down

0 comments on commit 1fe8c77

Please sign in to comment.