Tplot: Tplot

Description Usage Arguments Value Examples

View source: R/Tplot.R

Description

Tplot

Usage

1
2
3
4
5
Tplot(x, N = sum(x[, 1]), nc = max(apply(as.matrix(row.names(x)), 1,
  stringr::str_length)), ns = 1, verbose = F, icon = "bar", space = 1,
  icol = "blue", col = "lightblue", cut = FALSE,
  xlab = "Häufigkeit (%)", bcol = "white", border = par("fg"),
  s.x = 1, s.y = 1, seed = 12345, ...)

Arguments

x

matrix with labels in rownames and absolute frequencies in x[,1]

N

total number (denominator), if not sum(x[,1])

nc

number of characters of labels

ns

scal of labels

verbose

if TRUE, frequencies appear in labels

icon

two-column matrix of coordinates or "bar" for barplot

space

factor, usually 0.5 < 1, applied to x-dimension of icons for spacing

icol

icon outline color

col

icon fill color

cut

shall partial icons be displayed, if representing more than one observation?

xlab

xlab

bcol

bar color

border

bar and axis line color

s.x

SD to jitter icons horizontally in max(relative frequency)/50

s.y

SD to jitter icons vertically in dim(x)[1]/200

seed

seed for jittering

...

graphics parameters handed to call of barplot

y

vector containing dependent variable

Value

Plots the specified barplot using jittered icons.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: x <- matrix(1:3,3,1)
rownames(x) <-c("one","two","threefourfivesixseven\n eightnineteneleventwelve")
Tplot(x,45,nc=50,ns=2)
Tplot(x,nc=30,ns=2,icon=fir,icol="darkgreen",col="green",bcol="#FAFAFA",
 border="#EEEEEE",cut=TRUE,cex.axis=1.7,cex.lab=1.7)
Tplot(x,nc=30,ns=2,icon=cod[,c(2,1)],icol="blue",col="lightblue",border="white")
Tplot(x,nc=30,ns=1.5,icon=human,icol="gray20",col="mistyrose",border="lavender")
x <- matrix(c(3,4,9,17,57),ncol=1)
rownames(x)<- c("Ziege","Schaf","Rind","Schwein","Huhn")
Tplot(x,nc=5,ns=1,icon=bone[,c(2,1)],space=0.7,icol="grey50",
      bcol="grey90",border="grey80")

## End(Not run)

vonthein/illustrator documentation built on Nov. 7, 2019, 4:32 p.m.