gm.col_wl {metools}R Documentation

Bar Graphic with Legend Model

Description

gm.col_wl make a bar plot. Graphic models function family do graphic creation easy, is recommended for new programers, they have less and easyful parameters then p.col_ord but the graphic customize is more limited.

Usage

gm.col_wl(
  data,
  ncolx,
  ncoly,
  ntimes,
  title,
  legtitle,
  xlab = NULL,
  ylab = NULL,
  div100 = FALSE,
  percent = FALSE,
  fontsize = 0,
  colors = grDevices::rainbow(n = ntimes, v = 0.7),
  clines = "white",
  ctext = "white",
  cbackground = "#141414",
  cbserie = cbackground,
  legwpos = 0,
  legheight = 0.5
)

Arguments

data

a dataframe

ncolx

number of x column in data frame

ncoly

number of y column in data frame

ntimes

number of observations to plot (count by tail)

title

title of plot

legtitle

title of legendbox

xlab

x axis label

ylab

y axis label

div100

If data percent are not in decimal format set TRUE.

percent

If TRUE, y axis in percent (default=F)

fontsize

change size of all words in graphic (only numbers)

colors

colors of bars

clines

color of lines in graphic

ctext

color of words in graphic

cbackground

color of graphic background

cbserie

color of serie border (default= same cbackground)

legwpos

legend words position (numeric)

legheight

height of legend box

Value

Return a graphic.

Examples

v=data.frame("x"=seq(from=1,to=4,by=1),"y"=c(5,3,7,2))

gm.col_wl(v,1,2,title="Simple example",ntimes=3,legwpos=-2.5)


[Package metools version 1.0.0 Index]