[R] plot.POSIXct with axes FALSE

Petr Pikal petr.pikal at precheza.cz
Mon Apr 7 11:48:26 CEST 2003


Hallo all

I have a question regarding POSIX class objects.

I try tu use as.POSIXct for creating and plotting some time series. To be able to 
set labels for time (x) axis I started with plot(..., axes=FALSE) but although it 
suppressed all other axes, x axis is still plotted together with labels. Is it a bug?

see

datum.vyber<-seq(ISOdate(2000,1,1), ISOdate(2003,1,1), by="3 months")
plot(datum.vyber,1:13,axes=F)

in next command

axis.POSIXct(1,at=datum.vyber,format="%Y-%m")
axis(2)
box()

the x axis is overplotted with intended labels.

however I just found that I can use

plot(datum.vyber,1:13, xaxt="n") 
axis.POSIXct(1,at=datum.vyber,format="%Y-%m")

to get intended result. 

Why axes = FALSE does not work in case of POSIX classes?

Thank you.

Best regards
Petr Pikal
petr.pikal at precheza.cz
p.pik at volny.cz



More information about the R-help mailing list