#' @title pretty_start
#' @description start writing plot output to a file
#' @param destfile output file name
#' @param sizex the horizontal size in px
#' @param sizey the vertical size in px
#' @param palet optional:palet to use
#' @return NA
#' @examples
#' # pretty_start("this.png", 500,500)
#' # pretty_end() # closes the file
pretty_start <-function(destfile, sizex, sizey, palet=1){
pretty_init(pal.nr=palet)
png(filename = destfile,
width = sizex, height = sizey, units = "px", pointsize = 16
#,type = c("quartz")
)
}
#' @title pretty_end
#' @description closes current plot output to a file
pretty_end <-function(){ dev.off()}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.