LSD.pie: Custom-built piechart version

Description Usage Arguments Author(s) See Also Examples

View source: R/LSD.pie.R

Description

Piecharts at arbitrary position and radii.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
LSD.pie(
  props,
  x = 0,
  y = 0,
  radius = 1,
  colpal = "prgn",
  simulate = FALSE,
  daltonize = FALSE,
  cvd = "p",
  edges = 1000,
  add = FALSE,
  xlim = c(-1, 1),
  ylim = c(-1, 1),
  main = "LSD.pie: piecharts",
  alpha = NULL,
  addPercent = FALSE,
  textcol = "black",
  clockwise = FALSE,
  init.angle = 0,
  labels = c(),
  cex = 1,
  cex.percentage = cex,
  border = NA,
  ...
)

Arguments

props

a numeric vector giving the relations of the pie pieces (need not to be normalized).

x

x-position of the piechart.

y

y-position of the piechart.

radius

a numeric value giving the radius of the piechart.

colpal

a character vector containing R built-in color names or a name of a LSD colorpalette as a character string (see disco() or disco) (defaults to "heat", if not specified).

simulate

logical: if TRUE (FALSE by default), a converted colorpalette is used to simulate dichromat vision according to http://www.daltonize.org (see daltonize).

daltonize

logical: if TRUE (FALSE by default), a converted colorpalette is used to enhance dichromat vision according to http://www.daltonize.org (see daltonize).

cvd

character string implying the type of color vision deficiency ("p" for protanope, "d" for deuteranope or "t" for tritanope).

edges

an integer giving the number of edges the "circle" will have.

add

logical: if TRUE (FALSE by default), the pie is added to an existing plot.

xlim

x limits, standard graphics parameter.

ylim

y limits, standard graphics parameter.

main

title(s) of the plot, standard graphics parameter.

alpha

alpha value: a two-digit integer between 01 and 99 for color opacity, i.e. appearance of partial or full transparency (usage omitted by default).

addPercent

logical: if TRUE (FALSE by default), the percentage of each slice is written inside of the pie.

textcol

a R build-in color for the percentages of addPercent.

clockwise

if TRUE (FALSE by default), slices drawn clockwise (counter clockwise, if FALSE).

init.angle

a numerical value representing an angle as a starting angle for the drawn slices.

labels

a character vector giving the names for the pie slices.

cex

scaling a numeric value giving the expansion factor for the slice names (if labels are given).

cex.percentage

a numeric value giving the expansion factor for the percentage values (if addPercent = TRUE).

border

a R build-in color giving the border color (NA by default).

...

additional parameters to be passed to points and plot.

Author(s)

Bjoern Schwalb, Carina Demel

See Also

demotour, disco, colorpalette

Examples

1
2
3
4
5
6
7
emptyplot(xlim=c(1,9),ylim=c(1,9))
mtext(paste("LSD.pie: piecharts"),3,2,cex=1.25)
polygon(c(4,2,4,7,8),c(4,8,4,2,8))
LSD.pie(sample(1:50,5),4,4,add=TRUE,radius=2,colpal="prgn",alpha=75)
LSD.pie(sample(1:50,5),2,8,add=TRUE,colpal="prgn",alpha=75)
LSD.pie(sample(1:50,5),8,8,add=TRUE,colpal="prgn",alpha=75)
LSD.pie(sample(1:50,5),7,2,add=TRUE,colpal="prgn",alpha=75)

Example output



LSD documentation built on July 2, 2020, 4:14 a.m.

Related to LSD.pie in LSD...