[R] plot with abscissa in hours/weekdays

Ritwik Sinha ritwik.sinha at gmail.com
Mon May 15 22:37:06 CEST 2006


Hi,

You can use the axis() command.

For example

plot(xvec,yvec, xaxt="n")
axis(side=1, labels=c("Mon", "Tue"), at=c(0,1))

The "xaxt" sets up the axis but does not plot it. And axis does the rest.

Ritwik.
Case Western Reserve University
http://darwin.cwru.edu/~rsinha




m p wrote:
> Hello,
> How can I use plot and have abscissa in hours
> say (20:00,22:00,00:00,02:00 etc) and also weekdays
> say (Mon, Tue, Wed, ...) ?
> Is there a command that I can put into
> plot(xvec,yvec...,axes=...) that would enable that?
> Thanks for help,
> Mark
>
> ______________________________________________
> 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
>
>   



More information about the R-help mailing list