make_glyphs_draw: Make glyphs in different classes

Description Usage Arguments Value Author(s) Examples

Description

Given a list of data vectors, make a corresponding list of glyphs in one of four different classes which are "png", "jpeg", "pixmap" and "tiff".

Usage

1
2
3
4
5
6
7
8
9
make_glyphs_draw(
  data,
  draw_fun,
  type = c("png", "jpeg", "pixmap", "tiff"),
  width = 50,
  height = 50,
  mar = rep(1, 4),
  ...
)

Arguments

data

a list of data vectors

draw_fun

function of drawing in a device given a data vector

type

string specifying the format of output. "png" means the output is a list of data matrices in the png format, "jpeg" means the output is in the jpeg format and so on.

width

the width of the device

height

the height of the device

mar

A numerical vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot

...

Arguments passed to 'png', 'jpeg', 'pixmap', or 'tiff' according to the 'type'

Value

a list of glyphs in different classes corresponding to the list of data

Author(s)

Wayne Oldford, Jiahua Liu

Examples

1
2
3
4
5
6
7
8
n <- 16
data <- list()
for (i in 1:n){
  data[[i]] <- rnorm(500)
}
glyphs <- make_glyphs_draw(data, hist, type = "jpeg", mar = rep(4, 4), width = 200, height = 200)
x <- getGridXY(n)
plot_glyphs(x, glyphs = glyphs, glyphWidth = 0.8, glyphHeight = 0.6, axes = FALSE, xlab = "", ylab = "")

rwoldford/glyphs documentation built on Nov. 14, 2020, 2:29 a.m.