powered by
Plot the histgram figure beautifully with ggplot.
gghistplot(data, mapping, bins = 10)
A histogram figure by ggplot
a tibble
the mapping parameter
the number of bins
date <- as.Date("2015-01-01") + days(0:180) thero <- returns(rGbm("thero", date))[-1] tthero <- tibble(x = date[-1], y = thero) gghistplot(tthero, aes(x = thero, y = stat(density)), bins = 20)
Run the code above in your browser using DataLab