Re: [R] abline is not plotting

2013-10-07 Thread hans74
Hi, it works now! Thanks to you both. I thought abline with the lm inside uses the already plotted x- and y-axes automatically, as it does for a abline( h = ... ), for example. Applying the logarithm on the lm-data fixes the graph. Thank you, Hans -- View this message in context: http://r.7

Re: [R] abline is not plotting

2013-10-04 Thread S Ellison
> I have some data I want to plot together with a best-fit line. (see MWE > below) ... > Can someone help me with that? What am I doing wrong? Not logging the lm. Also, you've calculated lm() the wrong way round; you've regressed x on y. Try plot(log(d), xlab="log(x)", ylab="log(y)") abline(l

Re: [R] abline is not plotting

2013-10-04 Thread John Kane
Well you logged the x and y values before plotting but did not log the lm(). I think this means you have plotted abline() off the scale. I'm not sure how to fix it though. John Kane Kingston ON Canada > -Original Message- > From: hans_han...@gmx.de > Sent: Fri, 4 Oct 2013 07:16:49 -0