Re: [R] Why does plot() ignore the data type for axis labels?

2008-02-19 Thread Stiffler
it is not what I'd expect as an end-user --- neither ?plot nor ?xy.coords seem to mention that coordinates need to be floating point numbers. Best regards, Stiffler -- View this message in context: http://www.nabble.com/Why-does-plot%28%29-ignore-the-data-type-for-axis-labels--tp1556

Re: [R] Why does plot() ignore the data type for axis labels?

2008-02-19 Thread Stiffler
Gavin Simpson wrote: > >> PS what's the right way to get integer labels? > > Do them by hand, if they are (numeric) integers > >> plot(x,y, axes = FALSE) >> axis(2) >> axis(1, at = x) >> box() > > You could try writing your own Axis.integer function if doing the extra > steps is a pain - som

[R] Why does plot() ignore the data type for axis labels?

2008-02-19 Thread Stiffler
Hello, I was wondering why the plot() command ignores the datatype when displaying axis labels. More specifically, if the data points are integers then the axis labels should intuitively also be integers, right? > x <- as.integer(c(1,2,3)) > y <-x > typeof(x) [1] "integer" > plot(x,y) > The ax