[Rd] barplot: space makes beside=F (PR#7668)

ligges at statistik.uni-dortmund.de ligges at statistik.uni-dortmund.de
Tue Feb 8 11:47:40 CET 2005


o.medek at sh.cvut.cz wrote:

> Full_Name: Ondrej Medek
> Version: 2.0.1
> OS: Linux/Debian Sarge
> Submission from: (NULL) (147.32.127.204)
> 
> 
> Hi,
> I had a R version 1.5.1 and I used a 'barplot' with 'beside=T' and 'space' has
> been vector of 8 numbers 'space=c(1,0.5,rep(c(0.5,-0.5),3))'. Then I upgraded to
> the R 2.0.1 and my graphs are broken. If I use any vector of more than 2
> elements for 'space' then the graph is drawn as 'beside=F' even if I specify
> 'beside=T'. 
> 
> In the previous version my graph was a graph of groups of eight bars separated
> by a big spaces. Every group consisted of 4 pairs of bars separated by a small
> space. It's impossible now.


This is not a bug. See ?barplot which tells us:

    space: [...] If height is a matrix and beside is TRUE,
           space may be specified by two numbers, where the
           first is the space between bars in the same group,
           and the second the space between the groups. [...]

and it works as described:

    barplot(matrix(1:10, 2), beside = TRUE, space = c(1, 7))


Uwe Ligges



More information about the R-devel mailing list