plot_gg_ppt | R Documentation |
Plot ggplot object to ppt
plot_gg_ppt(
gg,
out_ppt,
height = 6,
width = 6,
left = 5,
top = 5,
inches = FALSE,
sep_legend = FALSE,
transparent_bg = TRUE,
rasterize_plot = FALSE,
rasterize_legend = FALSE,
res = 300,
new_slide = FALSE,
overwrite = FALSE,
legend_height = NULL,
legend_width = NULL,
legend_left = NULL,
legend_top = NULL,
tmpdir = tempdir()
)
gg |
ggplot object |
out_ppt |
output pptx file |
height |
height in cm |
width |
width in cm |
left |
left alignment in cm |
top |
top alignment in cm |
inches |
measures are given in inches |
sep_legend |
plot legend and plot separately |
transparent_bg |
make background of the plot transparent |
rasterize_plot |
rasterize the plotting panel |
rasterize_legend |
rasterize the legend panel. Works only when sep_legend=TRUE and rasterize_plot=TRUE |
res |
resolution of png used to generate rasterized plot |
new_slide |
add plot to a new slide |
overwrite |
overwrite existing file |
legend_height, legend_width, legend_left, legend_top |
legend position and size in case |
tmpdir |
temporary directory to store the rasterized png intermediate files |
library(ggplot2)
gg <- ggplot(mtcars, aes(x = mpg, y = drat)) +
geom_point()
temp_ppt <- tempfile(fileext = ".pptx")
plot_gg_ppt(gg, temp_ppt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.