summaryrefslogtreecommitdiff
path: root/man/saveplot.Rd
diff options
context:
space:
mode:
Diffstat (limited to 'man/saveplot.Rd')
-rw-r--r--man/saveplot.Rd34
1 files changed, 34 insertions, 0 deletions
diff --git a/man/saveplot.Rd b/man/saveplot.Rd
new file mode 100644
index 0000000..170e077
--- /dev/null
+++ b/man/saveplot.Rd
@@ -0,0 +1,34 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/saveplot.R
+\name{saveplot}
+\alias{saveplot}
+\title{Save a ggplot object}
+\usage{
+saveplot(p, filename, units = "in", width = 10, height = 10, dpi = 600)
+}
+\arguments{
+\item{p}{ggplot object you want to save}
+
+\item{filename}{The name of the file you want to export to}
+
+\item{units}{The units for dimensions of the plot (default inches)}
+
+\item{width}{Width of the plot in units (default 10)}
+
+\item{height}{Height of the plot in units (default 10)}
+
+\item{dpi}{Dots per inch (detault 300)}
+}
+\value{
+No return value
+}
+\description{
+Standard method for saving ggplot objects for best
+quality for the desired use case
+}
+\examples{
+df <- data.frame(x = rnorm(100))
+p <- ggplot2::ggplot(data = df, ggplot2::aes(x = x)) + ggplot2::geom_histogram()
+saveplot(p, filename = 'plot.png')
+
+}