Skip to contents

Static plot Module that handles static plots like from the base::plot() function or ggplot2 objects.

Active bindings

plot

Plot object.

Methods

Public methods

Inherited methods


Method clone()

The objects of this class are cloneable with this method.

Usage

PlotStatic$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

library(DarwinShinyModules)
library(ggplot2)

staticFun <- function(data) {
  ggplot(data = data, mapping = aes(x = Sepal.Length, y = Sepal.Width, color = Species)) +
    geom_point() +
    theme_bw()
}

staticModule <- PlotStatic$new(fun = staticFun, args = list(data = iris))

if (interactive()) {
  preview(staticModule)
}