[R] Additional points to scatter plot show up at wrong place

Peter Menzel pmenzel at googlemail.com
Fri May 15 15:43:33 CEST 2009

Hi everyone,

I have a problem with adding points to scatter plots.
The plot is drawn with the scatterplot() function from the car library:

scatterplot(data[,2] ~ data[,1],

after that, I draw one line with abline(0,1,col="gray20") which works
perfectly fine.

now I want to add, say the point (0.6,0.6) to the plot with
The point is plotted, but not exactly at the proper coordinates, but
at something like (0.55,0.55).

When I use the plot() function to make the scatter plots, this problem
does not occur, but I want to have those nice box plots next to the X
and Y-axes that are drawn by scatterplot()..

Anybody has an idea how to get the points at the right place in the plot?

cheers, Peter

More information about the R-help mailing list