[R] How to show the second abline ?

Sarah Goslee sarah.goslee at gmail.com
Fri Nov 8 19:20:29 CET 2013


I have no idea where gap.plot() came from, so I can't reproduce this,
but you almost certainly need

y ~ x

in your formula.

abline(coef(lm(y ~ x)),col=1)

Sarah

On Fri, Nov 8, 2013 at 11:04 AM, Domokos Péter <domszi at gmail.com> wrote:
> Hi,
>
> I have the next script in R:
>
> x=c(8.0,17.5,23.5,32.0,38.5,48.5,58.5,68.5)
> y=c(267,246,290,294,302,301,301,298)
>
> gap.plot(x,y,ylim=c(8,310),pch=8,cex=0.5,
> xlab=c('Time'),ylab=c('uS'),
> gap=c(30,240),gap.axis='y',
> ytics=c(10,20,30,270,280,290,300))
> abline(h=31,col='white',lwd=20)
> axis.break(axis=2,31)
> axis.break(axis=4,31)
>
> abline(coef(lm(x~y)),col=1)#Why don't show this???
>
> Thank's for Your help,
> Péter
>
>


-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list