% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/export.R
\name{export}
\alias{export}
\title{Export a plotly graph to a static file}
\usage{
export(p = last_plot(), file = "plotly.png", selenium = NULL, ...)
}
\arguments{
\item{p}{a plotly or ggplot object.}

\item{file}{a filename. The file type is inferred from the file extension.
Valid extensions include 'jpeg' | 'png' | 'webp' | 'svg' | 'pdf'}

\item{selenium}{used only when \code{p} is a WebGL plot or the output
format is 'webp' or 'svg'. Should be an object of class "rsClientServer"
returned by \code{RSelenium::rsDriver}.}

\item{...}{if \code{p} is non-WebGL and the output file format is
jpeg/png/pdf arguments are passed along to \code{webshot::webshot()}.
Otherwise, they are ignored.}
}
\description{
This function is deprecated, use \link{save_image} instead.
}
\details{
For SVG plots, a screenshot is taken via \code{webshot::webshot()}.
Since \code{phantomjs} (and hence \code{webshot}) does not support WebGL,
the RSelenium package is used for exporting WebGL plots.
}
\author{
Carson Sievert
}
