Learn R Programming

RMOPI (version 1.1)

gghistplot: Plot the Histogram Figure

Description

Plot the histgram figure beautifully with ggplot.

Usage

gghistplot(data, mapping, bins = 10)

Value

A histogram figure by ggplot

Arguments

data

a tibble

mapping

the mapping parameter

bins

the number of bins

Examples

Run this code
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