Displaying 3 results from an estimated 3 matches for "timelim".
2009 Dec 21
1
proposal for new axis.Date/axis.POSIXct
...t;)[1:2])
text(x, 0.5, paste("span:", s), cex = 2)
text(x, 0.33, paste(format(times), collapse="\n"))
text(x, 0.05, "current axis.POSIXct")
text(x, 0.95, "proposed new prettyDate axis")
## draw new proposed axis function at top of plot
timelim <- par("usr")[1:2]
mostattributes(timelim) <- attributes(from)
axis(side = 3, at = prettyDate(timelim),
labels = prettyDate(timelim, do.format=TRUE))
})
devAskNewPage(FALSE)
Is it appropriate / desirable for this to be incorporated into R?
--
Felix Andrews / ??...
2007 Oct 25
1
Strange behavior with time-series x-axis
I recently called plot(x,y) where x was an array of POSIXct timestamps,
and was pleasantly surprised that it produced a nice plot right out of
the box:
z <- as.POSIXct(c("2006-10-26 08:00:00 EDT","2007-10-25 12:00:00 EDT"))
x <- seq(z[1],z[2],len=100)
y <- 1:100
plot(x,y,type="l")
The X axis had nice labels, one tick mark every other month. (Plotting
on
2010 May 21
0
pretty.Date(): changes to axis() methods?
...), pos = 4)
text(x[2], 0.5, format(times[2]), pos = 2)
text(mean(x), 0.05, "current axis.Date()")
text(mean(x), 0.95, "proposed new pretty() axis, with")
text(mean(x), 0.85, paste("n =", n), cex = 1.5)
## draw new proposed axis function at top of plot
timelim <- par("usr")[1:2]
mostattributes(timelim) <- attributes(times)
at <- prettyDate(timelim, n = n)
axis(side = 3, at = at, labels = attr(at, "labels"))
})
Here is a posible modification to axis.Date. As it calls pretty(), it
will only work in R 2.12.
axis.Date...