Good morning, i'm drawing a barplot (data are stored in a matrix,nrow=3,ncol=10). So i get 10 groups each containing 3 sub-bars. I need to change the range of the y-axis when i plot respectively the first and the other two sub-bars in each group. I can't manage. Could you help me? Thank you. Angela
angelare at to.infn.it wrote:> Good morning, > i'm drawing a barplot (data are stored in a matrix,nrow=3,ncol=10). So i > get 10 groups each containing 3 sub-bars. I need to change the range of > the y-axis when i plot respectively the first and the other two sub-bars > in each group. I can't manage. Could you help me?> barplot(matrix(rnorm(30), 10, 3)) > barplot(matrix(rnorm(30), 10, 3), beside=TRUE)> Thank you. > Angela > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Hi See help in plot.default for ylim and xlim. The same apply in case of barplot barplot(..... some stuff..., ylim =c(no1, no2)) HTH Petr On 11 May 2006 at 11:16, angelare at to.infn.it wrote: Date sent: Thu, 11 May 2006 11:16:27 +0200 (MEST) From: angelare at to.infn.it To: r-help at stat.math.ethz.ch Subject: [R] (no subject)> Good morning, > i'm drawing a barplot (data are stored in a matrix,nrow=3,ncol=10). So > i get 10 groups each containing 3 sub-bars. I need to change the range > of the y-axis when i plot respectively the first and the other two > sub-bars in each group. I can't manage. Could you help me? Thank you. > Angela > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.htmlPetr Pikal petr.pikal at precheza.cz
angelare at to.infn.it wrote:> Good morning, > i'm drawing a barplot (data are stored in a matrix,nrow=3,ncol=10). So i > get 10 groups each containing 3 sub-bars. I need to change the range of > the y-axis when i plot respectively the first and the other two sub-bars > in each group. I can't manage. Could you help me?Hi Angela, If you mean that you want two ordinates on your plot, have a look at: http://cran.r-project.org/doc/contrib/Lemon-kickstart/kr_addat.html or if you mean that you have one little and two big bars and you want a discontinuous axis, maybe gap.barplot in the plotrix package will suit you. Jim