Skip to content
Prev 106622 / 398525 Next

axis and times() problem

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