export_plot | R Documentation |
Export any ggplot2
, gridExtra
, or any plot object
created with R into rendered png
or jpg
file.
export_plot(
p,
name = "plot",
vars = NA,
sep = ".vs.",
width = 8,
height = 6,
format = "png",
res = 300,
dir = getwd(),
subdir = NA,
quiet = FALSE
)
p |
Plot object. Plot to render and export. |
name |
Character. File's name or suffix if vars is not |
vars |
Vector. Variable names to identify by filename. |
sep |
Character. Separator for |
width , height , res |
Numeric. Plot's width, height, and res (for grids). |
format |
Character. One of: |
dir , subdir |
Character. In which directory/subdirectory do you
wish to save the plot? Working directory as default |
quiet |
Boolean. Display successful message with filename when saved? |
No return value, called for side effects.
Other Tools:
autoline()
,
bind_files()
,
bring_api()
,
chr2num()
,
db_download()
,
db_upload()
,
export_results()
,
files_functions()
,
font_exists()
,
formatColoured()
,
formatHTML()
,
get_credentials()
,
glued()
,
grepm()
,
h2o_selectmodel()
,
haveInternet()
,
image_metadata()
,
importxlsx()
,
ip_data()
,
json2vector()
,
list_cats()
,
listfiles()
,
mail_send()
,
markdown2df()
,
move_files()
,
msplit()
,
myip()
,
quiet()
,
read.file()
,
statusbar()
,
tic()
,
try_require()
,
updateLares()
,
warnifnot()
,
what_size()
p <- noPlot()
export_plot(p, name = "noplot", width = 10, height = 8, res = 300, dir = tempdir())
export_plot(p, name = "noplot2", subdir = "newplots", dir = tempdir())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.