[R] Custom axis

joris.dewolf at cropdesign.com joris.dewolf at cropdesign.com
Wed Aug 1 12:01:58 CEST 2007



x <- 1:10
y <- rnorm(10,10,1)
x2 <- 3*x + 2
plot(y ~ x, xaxt = "n")
axis(side=1,at = x, labels = x2)

Joris








                                                                           
             Florent Bresson                                               
             <f_bresson at yahoo.                                             
             fr>                                                        To 
             Sent by:                  r-help at stat.math.ethz.ch            
             r-help-bounces at st                                          cc 
             at.math.ethz.ch                                               
                                                                   Subject 
                                       [R] Custom axis                     
             01/08/2007 11:49                                              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Dear R users,

I would like to draw a plot with a custom scale for the axis. More
precisely, instead of plotting  y on x, I want to plot y on a monotone
function of x (for instance a*x+b). Which command and/or package should I
use in order to get this result?

Thanks

Florent Bresson





_____________________________________________________________________________


______________________________________________
R-help at stat.math.ethz.ch 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