[R] Stretch the x-axis for better alignment comparison

Maggie la.foma at gmail.com
Wed Sep 23 20:25:23 CEST 2009


I have the following code that aligns the two graphs.
Problem is that in .pdf it gives me it x-axis (0-100) is broken down
into 0-20, 20-40..and so on.
I wonder if there is for it to display the x-axis (and y-axis) in more
detail than that.
I'd appreciate your input --

pdf(file="VECTOR & ICA ALIGNMENT.pdf", height=5, width=5)
par(oma=c(4,4,4,4),mar=c(2,2,2,2),mgp=c(1.8,0.1.8,0),mfrow=c(1,1))

vector <- read.table(file=paste("a_i_u_100.TXT",sep=""))
plot(test$V2,test$V1,xlim=c(1,100),ylim=c
(-1,10),xlab="TRs",ylab="amplitude",col="blue",type="l")
ica <- read.table(file=paste("ica_100.TXT",sep=""))
lines(test$V2,test$V1, col="red")
title ("VECTOR & ICA ALIGNMENT")

dev.off()




More information about the R-help mailing list