[R] How to specify axis interval unit...

Duncan Murdoch murdoch at stats.uwo.ca
Tue Mar 31 14:55:27 CEST 2009


On 3/31/2009 5:08 AM, V Prasanth wrote:
> Dear R Users:
> 
>  
> 
> Greetings!
> 
>  
> 
> Is there any way to specify the axis interval unit for barplots in R.? Any
> help is deeply appreciated.

You can set axes=FALSE, names="" and then use whatever axes you like. 
Modifying the first example in examples(barplot):

tN <- table(Ni <- stats::rpois(100, lambda=5))
r <- barplot(tN, col=rainbow(20), axes=F, names="")
axis(2, at=2^(0:5))
axis(1, at=r, labels=letters[1:length(tN)])

Duncan Murdoch
> 
>  
> 
> Thanks in advance!
> 
> Prasanth VP,
> Global Manager - Biometrics, 
> Delta Technology & Management Services Pvt Ltd, 
> Plot No: 13/2, Sector - I, 
> Third Floor, HUDA Techno Enclave, 
> Madhapur, Hyderabad - 500 033. 
> Office    : +91-40-3028 0659 
> Mobile   : +91-9848 290025 
>  <http://www.deltaintech.com/> www.deltaintech.com
> 
>  
> 
>  <http://www.deltaintech.com/>
> ****************************************************************************
> **************
> 
>  <http://www.deltaintech.com/> 'The information contained in this email is
> confidential and may contain proprietary information. It is meant solely for
> the intended recipient. Access to this email by anyone else is unauthorized.
> If you are not the intended recipient, any disclosure, copying, distribution
> or any action taken or omitted in reliance on this, is prohibited and may be
> unlawful. No liability or responsibility is accepted if information or data
> is, for whatever reason corrupted or does not reach its intended recipient.
> No warranty is given that this email is free of viruses. The views expressed
> in this email are, unless otherwise stated, those of the author and not
> those of DELTA Technology and Management Services pvt ltd or its management.
> DELTA Technology and Management Services pvt ltd reserves the right to
> monitor intercept and block emails addressed to its users or take any other
> action in accordance with its email use policy' 
> 
>  <http://www.deltaintech.com/> Thank you in advance for your cooperation.
> 
>  <http://www.deltaintech.com/>
> ****************************************************************************
> **************
> 
>  <http://www.deltaintech.com/> P Please don't print this e-mail unless you
> really need to.
> 
>  
> 
> 
> 	[[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.




More information about the R-help mailing list