R/l_resize.R

Defines functions l_resize

Documented in l_resize

#' @title Resize Plot Widget
#'
#' @description Resizes the toplevel widget to a specific size.
#'
#' @template param_widget
#' @param width width in pixels
#' @param height in pixels
#'
#' @seealso \code{\link{l_size}}, \code{\link{l_size<-}}
#'
#' @export
#'
#' @examples
#' if(interactive()){
#'
#' p <- l_plot(iris)
#'
#' l_resize(p, 300, 300)
#' l_size(p) <- c(500, 500)
#'
#'}
l_resize <- function(widget, width, height) {
    tcl("::loon::resize", widget, width, height)
    invisible()
}

Try the loon package in your browser

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

loon documentation built on July 9, 2023, 5:48 p.m.