Re: [R] bars' values on barplot

2007-08-06 Thread Greg Snow
[EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of akki > Sent: Saturday, August 04, 2007 4:44 PM > To: r-help@stat.math.ethz.ch > Subject: [R] bars' values on barplot > > Hi, > I nee

Re: [R] bars' values on barplot

2007-08-05 Thread Mark Wardle
Much better. Thanks! Mark On 05/08/07, Adrian Dusa <[EMAIL PROTECTED]> wrote: > On Sunday 05 August 2007, Mark Wardle wrote: > > [...] > > So, try this for starters: > > my.values=1:5 > > x <- barplot(my.values, ylim=c(0,7)) > > text(x, 0.4+my.values, "wibble") > > Mark, you could use the "pos" a

Re: [R] bars' values on barplot

2007-08-05 Thread Adrian Dusa
On Sunday 05 August 2007, Mark Wardle wrote: > [...] > So, try this for starters: > my.values=1:5 > x <- barplot(my.values, ylim=c(0,7)) > text(x, 0.4+my.values, "wibble") Mark, you could use the "pos" argument from ?par: my.values=10:15 x <- barplot(my.values, ylim=c(0,11)) text(x,

Re: [R] bars' values on barplot

2007-08-05 Thread Mark Wardle
Akki, 1. Have a look at the result from a barplot() call. >From the help: A numeric vector (or matrix, when beside = TRUE), say mp, giving the coordinates of all the bar midpoints drawn, useful for adding to the graph. 2. Have a look at the text() function that will annotate plots! So, try thi

[R] bars' values on barplot

2007-08-04 Thread akki
Hi, I need bars' values on barplot, and I don't know how I can put it. I do my barplot as: data<-read.table("/my_path/file.dat",header=T, sep="\t") barplot(as.matrix(data),log="y",beside=TRUE,main="my_title", xlab="x name", ylab="y name"). How can I add the values on each bar? Thanks..