[R] Space between bars in barplot
Peter Dalgaard
P.Dalgaard at biostat.ku.dk
Thu Oct 9 09:53:05 CEST 2008
Richard.Cotton at hsl.gov.uk wrote:
>> with the "space" parameter it is possible to change the gap / distance
>> between the bars, but is it also
>> possible to change the "space" after each 6th bar?
>> So for example you have bars from 1 to 6 then a large gap and then the
>>
> next
>
>> six bars from 7 to 12
>>
>
> Try, for example
>
> y <- runif(13)
> y[7] <- NA
> barplot(y)
>
Also notice that the space argument can be a vector, so
barplot(1:12,space=rep(c(.1,.5,.1),c(6,1,5)))
--
O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list