[R] tickmarks with time in dotplots
Phil Spector
spector at stat.berkeley.edu
Tue Feb 23 00:22:23 CET 2010
Mikkel -
Suppose you want tick marks at every half hour:
ticks = seq(as.POSIXct('2010-02-22 12:00:00 PST'),
as.POSIXct('2010-02-22 17:00:00 PST'),by='30 min')
dotplot(Name ~ Time, data = C, horizontal = TRUE,scales=list(x=list(at=ticks)))
Hope this helps.
- Phil Spector
Statistical Computing Facility
Department of Statistics
UC Berkeley
spector at stat.berkeley.edu
On Mon, 22 Feb 2010, Mikkel Grum wrote:
> Hi,
>
> I'm drawing lattice dotplots with time along the x-axis as in:
>
> C <-data.frame(c("A", "B"),Sys.time()+ rnorm(50)*3600)
> names(C) <- c("Name", "Time")
> dotplot(Name ~ Time, data = C, horizontal = TRUE)
>
> On my display, the x-axis shows tick marks every two hours. I would like to show something more frequent; at least every hour, possibly more often. I've tried many variants of my understanding of the syntax in the help file, but I'm not making progress.
>
> Any suggestions?
>
> All suggestions greatly appreciated.
>
> Mikkel
>
> ______________________________________________
> R-help at r-project.org 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