Last data update: 2014.03.03

R: Plot Horizontal Bars
PlotHorizBarR Documentation

Plot Horizontal Bars

Description

A more flexible implementation of plotting horizontal bars with definable start and end points.

Usage

PlotHorizBar(from, to, grp = 1, col = "lightgrey", border = "black",
             height = 0.6, add = FALSE, xlim = NULL, ylim = NULL,...)

Arguments

from

a numeric vector specifying the start of the bars.

to

a numeric vector specifying the end of the bars.

grp

a grouping factor, determining on which line the bar will be printed. The groups start with y=1 and grow.

col

a vector with the colors of the bars. Default is "lightgrey". This will be recyled if necessary.

border

the border color of the bars. Default ist "black". Set this to NA if no border is to be printed.

height

the height of the bars. Defaults to 0.6.

add

logical, if TRUE (default) add bars to current plot.

xlim, ylim

limits in x and y.

...

the dots are passed to plot.new.

Author(s)

Andri Signorell <andri@signorell.net>

See Also

barplot

Examples

PlotHorizBar(from=1:5, to=3:7, grp=1:5, col=PalHelsana()[1:5])

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(DescTools)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DescTools/PlotHorizBar.Rd_%03d_medium.png", width=480, height=480)
> ### Name: PlotHorizBar
> ### Title: Plot Horizontal Bars
> ### Aliases: PlotHorizBar
> ### Keywords: hplot
> 
> ### ** Examples
> 
> PlotHorizBar(from=1:5, to=3:7, grp=1:5, col=PalHelsana()[1:5])
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>