binWidth: Bin Widths for Histograms

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

Generates a function to be used as the breaks= argument of hist, to ensure bins of a given, fixed width will be used

Usage

1
binWidth(w, align = NULL, ...)

Arguments

w

the required bin width in x-units

align

an optional value at which some bin boundary will align.

...

additional parameters, currently not used

Value

a breaks function to be used by hist

Examples

1
hist(~log(crim), MASS::Boston, binWidth(0.35, align = 0), fill = pal_desert)

BillVenables/WWRGraphics documentation built on Feb. 1, 2021, 12:13 p.m.