[R] Re : Custom axis

Florent Bresson f_bresson at yahoo.fr
Wed Aug 1 12:14:09 CEST 2007


Maybe I do not explain well what I would like to do. I do not want to change the labels of the axis, but the scale. What I want is a general procedure for changing the scale. Its like using a logarithmic scale on a plot. Labels are the same, but the increases of x along the x-axis are defined by a known monotone and continuous function.

Florent Bresson

----- Message d'origine ----
De : "joris.dewolf at cropdesign.com" <joris.dewolf at cropdesign.com>
À : Florent Bresson <f_bresson at yahoo.fr>
Cc : r-help at stat.math.ethz.ch; r-help-bounces at stat.math.ethz.ch
Envoyé le : Mercredi, 1 Août 2007, 12h01mn 58s
Objet : Re: [R] Custom axis



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