barPercentage: Pretty customizable barplot

View source: R/barPercentage.R

barPercentageR Documentation

Pretty customizable barplot

Description

Pretty customizable barplot

Usage

barPercentage(
  x,
  cols = NULL,
  lwd = 2,
  digits = 1,
  val_perc = c(1, 2),
  titleLab = NA,
  textPos = 2,
  sameColLines = TRUE,
  tagPosDelay = 0
)

Arguments

x

Numeric vector for plotting. See Details.

cols

Color palette used for plotting.

lwd

Line width.

digits

Number of digits for rounding.

val_perc

Whether to show values and/or percentage in labels.

titleLab

Label for title.

textPos

A position specifier for the text.

sameColLines

logical Do you prefer that the color of lines and the bar sections will be the same?

tagPosDelay

Relative origin of guide lines expresed in a single number from -1 to 1.

Details

x must be numeric and the names of values will be used for legend labels. If the vector does not have names, a temporal names will be created on the form of 'Value_#'.

Value

Nothing but the pretty barplot.

Examples

barPercentage(x = c(55, 14, 10, 2))

LuisLauM/ruisu documentation built on March 26, 2024, 8:23 a.m.