[R] plot problems

Ben Bolker bolker at zoo.ufl.edu
Mon May 21 23:06:23 CEST 2007


Markus voigt <markus-voigt <at> gmx.net> writes:

> plot(table(currentarray)/1000,typ="b", 
> col=c("red"),ylim=c(0,0.8),xlim=c(1,8))

  Not at all obvious but here's what you have
to do to use the proper x values:

t2 = table(currentarray2)/1000
x2 = as.numeric(names(t2))
t3 = table(probearray)/1000
x3 = as.numeric(names(t3))
lines(x2,t2,type="b",col="blue")
lines(x3,t3,type="b",col="darkgreen")

  good luck,
   Ben Bolker



More information about the R-help mailing list