[R] Misunderstanding with lines (or elsewhere)

vincent at 7d4.com vincent at 7d4.com
Tue Jul 11 14:16:05 CEST 2006


Misunderstanding with lines(...) :
http://7d4.com/r/

I would like the y coordinate of the horizontal line to be 1/4,
and also the line to begin at x=0 and end at y=1.

I'm obviously missing something
... so if anybody could help.

Many thanks.


test = function()
{
bmp('test.bmp', width=100, height=100)
m = matrix(0, 2, 2)
par(new=T, fig = c(0,1,0,1), mai=c(0,0,0,0), mar=c(0,0,0,0), bty='n')
image(m)
lines(c(0,1), c(1/4,1/4))         # horizontal line
a = dev.off()
}


The result :
http://7d4.com/r/



More information about the R-help mailing list