Hi All,

I'm trying to do a Scatterplot (package: car), and add a line (just for
reference).

There is my code:
#------------------------------------Code---------------------------------------------------
library("car")
library("calibrate")
G_T<-c("car","bike","boat")
ave<-c(80,10,45)
perf<-c(100,80,75)
df2<-data.frame(G_T,ave,perf)

scatterplot(ave ~ perf, data=df2,smoother=FALSE,xlim=c(0,100),ylim=c(0,100))    
                                                              
textxy(df2$perf,df2$ave, df2$G_T)

#The wrong offset begin here.
grid()
lines(x=c(0,40),y=c(20,20),type="l")
#---------------------------------------------------------Code
end---------------------------------------------

Here is the plot:
<http://r.789695.n4.nabble.com/file/n4647202/Offset_Scatterplot.png> 

My problem is that the line should start at (0,20) and end at (40,20) , and
it has a offset...
What should i do? 

Thanks
Francisco



--
View this message in context: 
http://r.789695.n4.nabble.com/scatterplot-with-wrong-line-offset-tp4647202.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to