R/molaR_bgplot.R

Defines functions molaR_bgplot

#' Internal function for making molaR plot legends
#' 
#' Function properly scales legends and prints them to the background of rgl
#' devices
#' @param expression it knows what to do...
#'
#' 
#' @noRd

molaR_bgplot <- function(expression){
    filename <- tempfile(fileext = ".png")
    png(filename = filename, width = 800, height = 800)
    value <- expression
    dev.off()
    result <- bg3d(texture = filename, col = "white", lit = FALSE)
    invisible(structure(result, value = value))
}

Try the molaR package in your browser

Any scripts or data that you put into this service are public.

molaR documentation built on Feb. 16, 2023, 10:33 p.m.