% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fortify_stats_density.R
\name{ggdistribution}
\alias{ggdistribution}
\title{Plot distribution}
\usage{
ggdistribution(
  func,
  x,
  p = NULL,
  colour = "#000000",
  linetype = NULL,
  fill = NULL,
  alpha = NULL,
  xlim = c(NA, NA),
  ylim = c(NA, NA),
  log = "",
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  asp = NULL,
  ...
)
}
\arguments{
\item{func}{PDF or CDF function}

\item{x}{Numeric vector to be passed to func}

\item{p}{\code{ggplot2::ggplot} instance to plot}

\item{colour}{Line colour}

\item{linetype}{Line type}

\item{fill}{Fill colour}

\item{alpha}{Alpha}

\item{xlim}{X axis limit}

\item{ylim}{Y axis limit}

\item{log}{log}

\item{main}{main}

\item{xlab}{xlab}

\item{ylab}{ylab}

\item{asp}{asp}

\item{...}{Keywords passed to PDC/CDF func}
}
\value{
ggplot
}
\description{
Plot distribution
}
\examples{
ggdistribution(dnorm, seq(-3, 3, 0.1), mean = 0, sd = 1)
ggdistribution(ppois, seq(0, 30), lambda = 20)

p <- ggdistribution(pchisq, 0:20, df = 7, fill = 'blue')
ggdistribution(pchisq, 0:20, p = p, df = 9, fill = 'red')
}
