artwork | R Documentation |
An S4 class to represent an entire graphic, artwork or animation.
## S4 method for signature 'artwork' initialize( .Object, ..., name = "artwork", pages = list(), deviceSettings = list(), format = "screen", folder = "", frameFolder = "", width = 4, height = 4, mode = 0, useGrid = FALSE, useShowText = FALSE, viewports = list(), style = list(mai = c(0, 0, 0, 0), xaxt = "n", yaxt = "n", yaxs = "i", xaxs = "i", mgp = c(0, 0, 0), oma = c(0, 0, 0, 0), plt = c(0, 1, 0, 1)), data = list(artBorder_col = "white", artBorder_border = "black"), units = list(), fonts = "", classes = c(artBorder = "rect"), psdata = list(), framerate = 10, startingFrame = 1 ) ## S4 method for signature 'artwork,list' e1 + e2 ## S4 method for signature 'artwork,list' e1 - e2 artwork(...)
name, format, deviceSettings, width, height, mode, folder, frameFolder, useGrid, useShowText, viewports, fonts, style, p, units, classes, psdata, framerate |
parameters for the constructor new("artwork") go directly into the relevant slots |
pages, ... |
These parameters are merged into the pages slot. |
The default artwork is a single frame image, displayed on screen with no margins, and no content.
The possible values of mode are:
mode=-2 All functions like component functions, layer functions etc are run and the resulting artwork is returned.
mode=-1 As mode -2, but only the maximal co-ordinates for xlim and ylim are returned.
mode=0 All frames are plotting on a single device, on page 1 of the file where appropriate
mode=1 On devices with multiple pages, seperate frames are on seperate pages.
mode=2 Seperate frames are saved in seperate files
mode=3 As mode 2, and ffmpeg is used to create a video afterwards.
mode=4 No plotting takes place, only the ffmpeg command from mode=3 is run. If you do artwork +or- a list, it will +or- each element in the list sequentially.
pages
A list of pages contained in the layer
name
A name for the file if saved to a single file
format
Can be "screen", "pdf", "jpg", "bitmap", "cairoPDF", "png" or "cairoPNG".
deviceSettings
A list of other device settings not covered by existing slots.
width
width of the artwork
height
height of the artwork
mode
controls the meaning of frames and how animations are handled. See details.
folder
location for the artwork to be saved if saved to a file
frameFolder
location for frames to be saved if doing animations with mode 3
useGrid
logical. if TRUE grid graphics are used instead of base graphics
useShowText
logical to use showText in devices that support it.
viewports
WHAT IS THIS?? DELETE????
fonts
a character vector of font names.
style
A list of parameters inherited by all pages, sections, layers and components in the artwork
data
A list of parameters inherited by all pages, sections, layers and components in the artwork
units
A list of units inherited by all pages, sections, layers and components in the artwork
classes
A list that connects component types to plotting functions.
psdata
NOT USED ANYWHERE WHAT IS THIS DELETE IT?????????
framerate
A pair of numbers used for animations (mode 3)
startingFrame
A number. Used to add frames to an existing collection of frames for modes 2, 3 and 4.
print(1+1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.