[R] bars' values on barplot

Adrian Dusa dusa.adrian at gmail.com
Sun Aug 5 15:20:56 CEST 2007


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=100000:100005
x <- barplot(my.values, ylim=c(0,110000))

text(x, my.values, "wibble", pos=3) # always does what you want, whereas:

text(x, 0.4+my.values, "wibble") # doesn't look very nice

HTH,
Adrian


-- 
Adrian Dusa
Romanian Social Data Archive
1, Schitu Magureanu Bd
050025 Bucharest sector 5
Romania
Tel./Fax: +40 21 3126618 \
          +40 21 3120210 / int.101



More information about the R-help mailing list