Hi, 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 Thanks a lot! -- View this message in context: http://www.nabble.com/Space-between-bars-in-barplot-tp19878227p19878227.html Sent from the R help mailing list archive at Nabble.com.
mentor_ <mentor_ <at> gmx.net> writes:> 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 12Space can be a vector, as the doc say. Try barplot(rnorm(100),space=1:10) for a nice effect. Dieter
> 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 thenext> six bars from 7 to 12Try, for example y <- runif(13) y[7] <- NA barplot(y) Regards, Richie. Mathematical Sciences Unit HSL ------------------------------------------------------------------------ ATTENTION: This message contains privileged and confidential inform...{{dropped:20}}
Hi, thanks again for your help. I played around with your suggestions to change the appearance of my graph, but there is still a problem I could not fix. The vector, which I want to plot, contains 60 entries. After 3 bars I want to have a large gap between the next 3 bars. But what always happens is, that R took at the beginning just 2 bars and then always 3 bars ending up with one bar at the end. So I have created a new vector v <- c(0,0,vectorToPrint) plotting this vector with the following command: barplot(v, space=rep(c(0,0,2)) ). It works but getting always some warning messages. Instead of 0,0 I tried as well NA, NA but same result. So is there a way to achieve that without warning messages? Cheers, Mentor -- View this message in context: http://www.nabble.com/Space-between-bars-in-barplot-tp19878227p19919930.html Sent from the R help mailing list archive at Nabble.com.
> I played around with your suggestions to change the appearance of mygraph,> but there is still a problem I could not fix. > The vector, which I want to plot, contains 60 entries. After 3 bars Iwant> to have a large gap > between the next 3 bars. But what always happens is, that R took at the > beginning just 2 bars > and then always 3 bars ending up with one bar at the end. > So I have created a new vector v <- c(0,0,vectorToPrint) plotting this > vector with the following > command: barplot(v, space=rep(c(0,0,2)) ). It works but getting alwayssome> warning messages. > Instead of 0,0 I tried as well NA, NA but same result. So is there a wayto> achieve that without > warning messages?Seeing as it's late on a friday afternoon, could you give us a fighting chance of helping you by 1) providing enough code to reproduce the problem, and 2) telling us what the warning said. (As per the posting guide.) Regards, Richie. Mathematical Sciences Unit HSL ------------------------------------------------------------------------ ATTENTION: This message contains privileged and confidential inform...{{dropped:20}}