Skip to content
Prev 119 / 919 Next

R Scatter plot partially generated in Fedora

Your R install is fine. You plot commands are wrong, though.

Also no need for semicolons at end of lines anymore.

Note your first x axis goes from 12, 16.

then later you try to write points at 10, which are out of bounds.  if
you want to write at 10, re-do your figure.  This code shows 5 points
on graph.

plot(x=c(7,18), y=c(6,14) , type="n", main="Test", xlab="X", ylab="y")

x <- c(12, 14, 16);
y <- c(7, 12, 10);
points(x,y, col="blue")
x2 <- c(10, 15);
y2 <- c(8, 12);
points(x2, y2, col="green");

After it looks good on screen, then wrap in the png commands.
On Fri, Mar 26, 2010 at 2:48 PM, Nara Rama <nara at cloudbiosciences.com> wrote: