[R] graph lines don;t appear

Philipp Pagel p.pagel at wzw.tum.de
Tue Mar 15 12:12:07 CET 2011


On Tue, Mar 15, 2011 at 12:01:45PM +0100, Sara Szeremeta wrote:
> Hi
> 
>  I am trying to plot two simple graphs with a grid in background. The axis
> and grid appears in correct position, but the actual data are not there....
>  Can somebody provide me a hint what is missing?
> 
>  The code is:
> 
> pln <- read.table(file="PLN.txt", header=TRUE, dec=",")
> par(mfrow=c(1,2))
> plot(pln[,1], type="l", lwd="2", ylab="EUR/PLN", xlab=NULL, xlim = c(1993,
> 2011), ylim = c(2, 5),  panel.first = grid(nx=NULL, ny=NULL))
> plot(log(pln[,1]), type="l", ylab="EUR/PLN", xlab=NULL, xlim = c(1993,
> 2011), panel.first = grid(equilogs = FALSE))

pln[,1] is just one column, so you are not plotting the values vs the
year but vs. their index. As xlim is set to the interval 1993-2011 you
simply don't see your data...

cu
	Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
Maximus-von-Imhof-Forum 3
85354 Freising, Germany
http://webclu.bio.wzw.tum.de/~pagel/



More information about the R-help mailing list