plot_histogram: Make a pretty histogram of something.

View source: R/plot_hist.R

plot_histogramR Documentation

Make a pretty histogram of something.

Description

A shortcut to make a ggplot2 histogram which makes an attempt to set reasonable bin widths and set the scale to log if that seems a good idea.

Usage

plot_histogram(
  df,
  binwidth = NULL,
  log = FALSE,
  bins = 500,
  adjust = 1,
  fillcolor = "darkgrey",
  color = "black"
)

Arguments

df

Dataframe of lots of pretty numbers.

binwidth

Width of the bins for the histogram.

log

Replot on the log scale?

bins

Number of bins for the histogram.

adjust

The prettification parameter in the ggplot2 density.

fillcolor

Change the fill colors of the plotted elements?

color

Change the color of the lines of the plotted elements?

Value

Ggplot histogram.

See Also

[ggplot2]

Examples

## Not run: 
 kittytime = plot_histogram(df)

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.