plot_dist: A function to plot distributions

Description Usage Arguments Examples

View source: R/plot_dist.R

Description

This function generates a plot of a normal distribution using user supplied mean and standard deviation.

Usage

1
plot_dist(distribution = "gaussian", range = c(-3, 3), mean = 0, sd = 1, ...)

Arguments

distribution

A distribution type (defaults to gaussian)

range

A vector of 2 values indicating the range for the x-axis and the data

mean

A numeric value for the center of gravity of the distribution (defaults to 0)

sd

A numeric value for the standard deviation of the distribution (defaults to 1)

...

Arguments to be passed to ggplot. Specifically 'font_color' and 'tex'.

plot_dist

A function for plotting normal distributions

Examples

1
2
3
4
5
plot_dist(font_color = "darkblue")
plot_dist(range = c(-10, 10), distribution = "gaussian", mean = 1, sd = 3)
plot_dist(range = c(-1, 1), distribution = "gaussian", mean = 0, sd = 0.3)
plot_dist(range = c(-5, 5), distribution = "anything")
plot_dist(tex = "$Hello_{\\Delta} = 4^5$")

jvcasillas/ds4ling documentation built on April 8, 2021, 10:15 p.m.