Calculates the spaces between bars of widths w at positions x as difference between the x values minus half the width of the bars/bar groups.
hsBpSpace(
myWidth,
position,
myXlim = NULL,
myBeside = FALSE,
barsPerGroup = 1,
innerSpace = 0,
dbg = FALSE
)
Bar widths. If bars are to be stacked (isp = NULL, see below) w represents the widths of the different (stacked) bars. If bars are to be arranged side by side (isp >= 0) w represents the widths of the bars within one and the same bar group. Corresponding bars of different groups will always have the same width.
X-positions of bars/bar groups
Vector containing minimum and maximum x-value to be shown in the plot.
If TRUE, bars of a bar group are not stacked but arranged
side by side. Then, myWidth
contains the widths of the bars within
one group. Otherwise (myBeside
= FALSE) myWidth
contains the
widths of the (stacked) bars.
Number of bars per group. If this parameter is greater than 1, it means that bars are to be arranged side by side instead of stacked.
"Inner" space between bars of the same group (only used if bpg > 1).
whether to print debug messages or not
Returns a space vector as needed to be passed to the barplot function