r - How do you save a ggplot_table as a jpeg? -


following sandy muspratt's answer question: "inserting image ggplot outside chart area", how save output jpeg? helpful generating reports in r.

better create grobs, arrange them using arrangegrob , use ggsave:

library(png) library(grid) library(ggplot2) ## create image grob img <- readpng(system.file("img", "rlogo.png", package="png")) g <- rastergrob(img, interpolate=true) ## ggplot2 grob p = qplot(x=x,y=y,data= data.frame(x=1:10,y=1:10)) library(gridextra) ## arrange , save  ggsave('test.png', arrangegrob(p,g)) 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -