From 7ab94fda3ad448b805b2d82edfbe6c8386b33afd Mon Sep 17 00:00:00 2001 From: leungi <30273868+leungi@users.noreply.github.com> Date: Sun, 31 May 2020 19:26:15 -0500 Subject: [PATCH] apply sensible default to geom_col orientation - setting `orientation` args of `geom_col()` to `x`, plot will show vertical bars, commonly used for histograms --- R/histogram.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/histogram.R b/R/histogram.R index d953a3b..4ef1480 100644 --- a/R/histogram.R +++ b/R/histogram.R @@ -89,7 +89,8 @@ dbplot_histogram <- function(data, x, bins = 30, binwidth = NULL) { ) ggplot(df) + - geom_col(aes(x, count)) + + geom_col(aes(x, count), + orientation = "x") + labs( x = quo_name(x), y = "count"