[R] problem with using lines command on windows XP machine

From: Edwin Commandeur <e.commandeur_at_uvt.nl>
Date: Thu 05 Jan 2006 - 21:27:01 EST


Hello,

I'm using R version 2.2.0 installed on windows XP machine, with SP2 (maybe it's also interesting to note it's laptop, so it outputs to a laptop screen) a l and I wanted to draw a line in a graph, but it does not seem to work.

To test it I use the following code:

x = c(-1,0,1)
y = c(-1,0,1)
plot(x,y, type="l", xlim=c(-1,1), ylim=c(-1,1))
lines(0)

If I understand the documentation right this should draw a line (with default settings, I'm not setting any parameters) at x=0.

I tried goofing around a bit setting linewidth and color differently, I tried using xy.coords etc, but no line appeared in the graph.

The commands abline and segments work perfectly fine (so I am now using segments to plot the line I want), but I still think the lines command should work.

Does anybody has similar problems drawing lines on XP machines (or laptops in general?)? Or I am doing something abominably wrong?

Greetings and thanks in advance for any replies, Edwin Commandeur



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 Received on Thu Jan 05 21:34:31 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:51 EST