DescTools (version 0.99.14)

PlotHorizBar: 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.

See Also

barplot

Examples

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

Run the code above in your browser using DataCamp Workspace