histogram: Create a histogram with the magma color scheme

Description Usage Arguments Value Examples

View source: R/histogram.R

Description

Create a histogram with the magma color scheme

Usage

1
histogram(df, x, y)

Arguments

df

A dataframe containing the variables for plotting

x

Column name of the numeric variable to be plotted on the x-axis

y

The quoted aggregation function to be plotted on the y-axis and to be used for the fill color. The input needs to be in the form of ..name.., where name can be values from the following list, with explanations in the parenthesis: count (number of points in bin), density (density of points in bin, scaled to integrate to 1), ncount (count, scaled to maximum of 1), ndensity (density, scaled to maximum of 1), width (widths of bins)

Value

A ggplot object.

Examples

1
2
3
library(palmerpenguins)
penguins_data <- penguins
histogram(penguins, flipper_length_mm, "..count..")

UBC-MDS/magmavizR documentation built on Feb. 6, 2022, 9:41 p.m.