gsplot: gsplot

View source: R/gsplot-class.R

gsplotR Documentation

gsplot

Description

Used to change the class of inputs to "gsplot".

Usage

gsplot(x = NULL, ...)

## Default S3 method:
gsplot(..., created = Sys.Date(),
  gsplot.version = packageDescription(getPackageName(), fields = "Version"),
  config.file = NA, theme = NA, frame.plot = TRUE)

## S3 method for class 'list'
gsplot(x)

Arguments

x

list

...

Further graphical parameters may also be supplied as arguments. See 'Details'.

created

vector of length one giving the date the gsplot object was created. Defaults to using Sys.Date(). Output class matches that of the input.

gsplot.version

vector of length one giving the version of the gsplot package used to create the object. Defaults to calling packageDescription(). Output class matches that of the input.

config.file

path to the file that will only be used for setting par in this one gsplot object. If NA (default), par is set by the global options set by load_config().

theme

There are several built in themes (see Themes). Additionally, the user can create a gsplot object in their workspace. This argument then takes the name of that object (either built-in or custom). If NA (default), no theme is used.

frame.plot

a logical indicating whether a box should be drawn around the plot. Default is TRUE.

Value

gsplot

Examples

gsplot() 
gsplot(theme = theme.hadley)
gs_config <- gsplot(config.file = 
system.file("extdata", "lineScatter.yaml", package = "gsplot")) %>%
lines(1:10, 1:10)

gs_config

gs <- gsplot(theme = theme.hadley) %>%
        points(1:10, 1:10, xlab="Index")
gs


USGS-R/gsplot documentation built on April 17, 2023, 8:45 p.m.