So maybe i will finaly succeed asking the right way,

 

Hy all,

I'm plotting graphs using plot() function, they are on X axes POSIX dates:

"POSIXt"   "oldClass" "POSIXct"  "POSIXlt"

I can't figure out why sometimes it prints the month and days and sometimes it 
prints the unix timestamps.

Here is an example that reproduce my problem the data's to use with it can be 
downloaded from http://www.alliance-ir.net/r-project/demo.tar.gz 
<http://www.alliance-ir.net/r-project/demo.tar.gz>  :

limite_x<-structure(as.numeric(read.table("limite_x")), 
class=c("POSIXt","POSIXct"))

limite_y<-as.numeric(read.table("limite_y"))

test<-as.numeric(read.table("y_values"))

abscisse_test<-structure(as.numeric(read.table("x_values")), 
class=c("POSIXt","POSIXct"))

plot((test/10)~abscisse_test,type="s",col="lightgreen",xlab="",ylab="",ylim=limite_y,xlim=limite_x)

length_test<-length(test)

#if i cut the var "test" to be closer to xlim values, i know that xlim is at 
the end of "test" :

test_short<-test[(length_test-10):length_test]

abscisse_test_short<-abscisse_test[(length_test-10):length_test]

plot((test_short/10)~abscisse_test_short,type="s",col="lightgreen",xlab="",ylab="",ylim=limite_y,xlim=limite_x)

dev.off()

> sessionInfo()

R version 2.4.0 (2006-10-03)

i386-pc-linux-gnu

 

locale:

[EMAIL PROTECTED];LC_NUMERIC=C;[EMAIL PROTECTED];[EMAIL PROTECTED];[EMAIL 
PROTECTED];[EMAIL PROTECTED];[EMAIL 
PROTECTED];LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;[EMAIL 
PROTECTED];LC_IDENTIFICATION=C

 

attached base packages:

[1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"

[7] "base"

 

COMTE Guillaume

Ingénieur Projet

Alliance Technologies

Projet Philharmonie

24 rue Martre

92110 Clichy

Tel : 01 40 87 48 06

Fax : 01 40 87 48 14

 


        [[alternative HTML version deleted]]

______________________________________________
R-help@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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to