Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.43 KB

README.md

File metadata and controls

50 lines (34 loc) · 1.43 KB

gghist: Quickly draw a histogram using ggplot2

R build status

gghist is a wrapper around ggplot2’s geom_histogram() to easily plot a histogram of a numeric vector. This is especially useful, since qplot() was deprecated in ggplot2 3.4.0.

Installation

You can install the current release from CRAN via

install.packages("gghist")

or the development version from Github via

devtools::install_github("frederikziebell/gghist")

Example

library(gghist)

x <- rnorm(100)
gghist(x)
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

x <- exp(rnorm(1000))
gghist(x, bins = 100, fill = "firebrick") + 
  scale_x_log10()