recGlyph: Keim's recursive pattern algorithm data visualization

Description Usage Arguments Value Author(s) References Examples

View source: R/Keimplot_combine.R

Description

recGlyph generates a data matrix of png format or a class of "pixmap" to display color strings in an order of recursive pattern provided by Keim in the space given a vector of colors

Usage

1
recGlyph(col, width, height, fill = FALSE, type = c("png", "pixmap"))

Arguments

col

vector of colors

width

vector of width in each level of algorithm

height

vector of height in each level of algorithm

fill

logical value indicating whether the color strings repeat from the beginning if number of colors in col is smaller than the total number of colors to display

type

string specifying the format of output. "png" means the output is a data matrix in the png format, and "pixmap" means the output is a class of pixmap.

Value

a data matrix of png format or a class of "pixmap" that is used to plot. See pixmap, writePNG, rasterImage

Author(s)

Jiahua Liu, Wayne Oldford

References

Keim, Daniel A. 1996. "Pixel-Oriented Visualization Techniques for Exploring Very Large Data Bases." Journal of Computational and Graphical Statistics 5 (1). Taylor & Francis: 58-77.

Examples

1
2
3
4
5
6
7
8
9
width=c(1,6,1,12,1)
height=c(1,1,4,1,3)
myPngmat <- recGlyph(width=width, height=height)
myPngmat <- recGlyph(width=width, height=height, col = colors(), fill = TRUE)
writePNG(myPngmat, target = "myplot.png")
plot(0,type='n', xlim=c(0,1), ylim=c(0,1), axes = FALSE,xlab = "", ylab = "")
rasterImage(myPngmat,0,0,1,1)
myPixmap <- recGlyph(width=width, height=height, col = colors(), type = "pixmap")
plot(myPixmap)

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