Re: [R] changing format of y-axis (barplot)

From: Benilton Carvalho <bcarvalh_at_jhsph.edu>
Date: Tue, 26 Feb 2008 01:52:23 -0500

bp = barplot(df$y,names.arg=NULL, yaxt="n", ylim=c(0, 1100000)) text(bp, df$y+15000, paste("Class", 1:6)) axis(2, df$y)

b

On Feb 26, 2008, at 1:41 AM, milton ruser wrote:

> Dear all,
>
> I have some data.frame and I would like (1) change the format of
> y=axis to
> escape of scientific format (like 1e+05...) and (2) label the value
> or other
> variable on the top of the bar.
>
> df<-data.frame(x=1:6,y=c(100,500,1000,25000,500000,1000000))
> barplot(df$y,names.arg=df$x)
>
> Thanks in advance,
>
> miltinho
> Brazil
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_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.



R-help_at_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. Received on Tue 26 Feb 2008 - 06:58:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 26 Feb 2008 - 07:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive