mplot3_lolli: 'mplot3' Lollipop Plot

View source: R/mplot3_lolli.R

mplot3_lolliR Documentation

mplot3 Lollipop Plot

Description

mplot3 Lollipop Plot

Usage

mplot3_lolli(
  x,
  order.on.x = TRUE,
  plot.top = 1,
  orientation = c("horizontal", "vertical"),
  xnames = NULL,
  points = TRUE,
  segments = TRUE,
  main = NULL,
  col = NULL,
  cex = 1.2,
  matching.segment.col = FALSE,
  segment.alpha = 0.333,
  lty = 3,
  lwd = 2,
  theme = rtTheme,
  palette = rtPalette,
  autolabel = letters,
  par.reset = TRUE,
  pdf.width = 6,
  pdf.height = 6,
  mar = c(2.5, 3, 2, 1),
  pty = "m",
  pch = 16,
  x.axis.at = NULL,
  y.axis.at = NULL,
  xlab = NULL,
  ylab = NULL,
  label.las = 1,
  label.padj = 0.5,
  xaxs = "r",
  yaxs = "r",
  xlab.adj = 0.5,
  ylab.adj = 0.5,
  filename = NULL,
  ...
)

Arguments

x

Float, vector: Input data

order.on.x

Logical: If TRUE, order by value of x. Default = TRUE

plot.top

Float or Integer: If <= 1, plot this percent highest absolute values, otherwise plot this many top values. i.e.: plot.top = .2 will print the top 20% highest values, and plot.top = 20 will plot the top 20 highest values

xnames

Character, vector: Names of x

main

Character: Main title

col

Color, vector: Lollipop color

cex

Float: Character expansion factor for points. Default = 1.2

matching.segment.col

Logical: If TRUE, color line segments using col, i.e. same as

segment.alpha

Float: Transparency for line segments. Default = .5 points. Default = FALSE, in which case they are colored with theme$fg

lty

Integer: Line type for segment segments. See par("lty") Default = 1

lwd

Float: Width for segment segments. See par("lty") Default = 1

theme

Character: Run themes() for available themes

palette

Vector of colors, or Character defining a builtin palette - get options with rtpalette()

autolabel

Character vector to be used to generate autolabels when using rtlayout with autolabel = TRUE.

par.reset

Logical: If TRUE, reset par setting before exiting.

pdf.width

Float: Width in inches for pdf output (if filename is set).

pdf.height

Float: Height in inches for pdf output.

mar

Float, vector, length 4: Margins; see par("mar")

pty

Character: "s" gives a square plot; "m" gives a plot that fills graphics device size. Default = "m" (See par("pty"))

pch

Integer: Point character.

x.axis.at

Float, vector: x coordinates to place tick marks. Default = NULL, determined by graphics::axis aautomatically

y.axis.at

As x.axis.at for y-axis

xlab

Character: x-axis label

ylab

Character: y-axis label

xaxs

Character: "r": Extend plot x-axis limits by 4% on either end; "i": Use exact x-axis limits.

yaxs

Character: as xaxs for the y-axis.

xlab.adj

Float: adj for xlab (See par("adj"))

ylab.adj

Float: adj for ylab (See par("adj"))

filename

Character: Path to file to save plot. Default = NULL

...

Additional arguments to be passed to theme function

Author(s)

E.D. Gennatas

Examples

## Not run: 
x <- rnorm(12)
mplot3_lolli(x)
# a "rounded" barplot
mplot3_lolli(x, segments = T, points = F,
             lty = 1, matching.segment.col = T,
             lwd = 10, segment.alpha = 1)

## End(Not run)

egenn/rtemis documentation built on Oct. 28, 2024, 6:30 a.m.