Perhaps:

x <- barplot(data, ylim=c(0, max(data)+1))
text(x,data+.2, data)


-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

On 25/10/2007, Bernd Jagla <[EMAIL PROTECTED]> wrote:
>
> Again me.
>
>
>
> I want to plot the numbers on the bars of a barplot.
>
> This can be done using hist function when setting the label argument true
> (i.e.
>
>
>
> data <- c(1,2,3,4)
>
> hist(data,  labels=T)
>
>
>
> When I try this using barplot I get an error:
>
>
>
> >     barplot(summary(data), labels=T)
>
> Error in axis(if (horiz) 2 else 1, at = at.l, labels = names.arg, lty =
> axis.lty,  :
>
>         formal argument "labels" matched by multiple actual arguments
>
> In addition: Warning message:
>
> parameter "labels" couldn't be set in high-level plot() function
>
>
>
> How would I do this the R(ight)-way?
>
>
>
> Thanks,
>
>
>
> Bernd
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to