[R] axis and times() problem

Gabor Grothendieck ggrothendieck at gmail.com
Wed Dec 27 13:32:58 CET 2006


Try:

plot(x, y, bty = "n", xaxs = "i", yaxs = "i")

Actually I think there may be a bug here since the axes do not intersect.

On 12/27/06, Knut Krueger <Knut-krueger at einthal.de> wrote:
> Dear R-Group,
> the first example is working as expected, but I need the plot without
> the box,
> normally no problem, but I am not able to get the x-axis formatted as
> times with the axis, command.
> I tried a lot of things, nothing was working so I used the most easy
> axis command in the second example here ....
>
> # working
>  library(chron) # for times()
>  library(graphics)# for axis
>    par(cex=1.2,lwd=1)
>  x <- c(times("12:15:00"),times("15:30:00"))
>    y <- c(1,5)
>    plot(x, y, type="n",adj=0, asp=0, xlab="", ylab="",font.axis=2,yaxt='n')
>
> # axis() command problem:
>    par(cex=1.2,lwd=1)
>  x <- c(times("12:15:00"),times("15:30:00"))
>    y <- c(1,5)
>    plot(x, y,axes=FALSE, type="n",adj=0, asp=0, xlab="",
> ylab="",font.axis=2,yaxt='n')
>  axis(1)
>
>
> Maybe anybody could help me to disable the box around the plot and get
> the x-axis formatted as times
>
> Regards Knut
>
> ______________________________________________
> 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