xyplot(y~ts, scales=list(x=list(at= as.numeric(ts),
labels=format(ts, "%H"))))
To make the ticks every six hours you just use seq.POSIXt
:
xyplot(y~ts, scales=list(
x=list(at= seq(as.POSIXct(t_ini), by="6 hour", length=5),
labels=format(seq(as.POSIXct(t_ini), by="6 hour", length=5),
"%H hrs"))
)