[R] An empty grey diagram

Stephen Liu satimis at yahoo.com
Sat Nov 20 06:35:34 CET 2010


Hi David,


> What happens when you follow the directions... i.e. type:
> plot.new()    #???

abline(lm(len ~ dose, data = ToothGrowth))
plot.new()

The grey background changes to white, still an empty graph

If continue on my version:-
abline(matrics)
plot(matrics$resid)

It plots a graph

B.R.
Stephen L







----- Original Message ----
From: David Winsemius <dwinsemius at comcast.net>
To: Stephen Liu <satimis at yahoo.com>
Cc: Joshua Wiley <jwiley.psych at gmail.com>; r-help at r-project.org
Sent: Sat, November 20, 2010 1:08:21 PM
Subject: Re: [R] An empty grey diagram


On Nov 19, 2010, at 11:14 PM, Stephen Liu wrote:

> Hi Josh,
>
>
>> with(ToothGrowth, plot(dose, len))
>> abline(lm(len ~ dose, data = ToothGrowth))
>
> ToothGrowth
> abline(lm(len ~ dose, data = ToothGrowth))
> Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
>  plot.new has not been called yet
>
> ToothGrowth
> attach(ToothGrowth)
> abline(lm(len ~ dose, data = ToothGrowth))
> Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
>  plot.new has not been called yet

What happens when you follow the directions... i.e. type:

plot.new()    #???


>
>
> Sorry, still fail only an empty grey background diagram displayed.
>
>
> B.R.
> Stephen L
>
>
>
> ----- Original Message ----
> From: Joshua Wiley <jwiley.psych at gmail.com>
> To: Stephen Liu <satimis at yahoo.com>
> Cc: r-help at r-project.org
> Sent: Sat, November 20, 2010 10:50:42 AM
> Subject: Re: [R] An empty grey diagram
>
> Hi Stephen,
>
> Please try:
>
> with(ToothGrowth, plot(dose, len))
> abline(lm(len ~ dose, data = ToothGrowth))
>
>
> Cheers,
>
> Josh
>
> On Fri, Nov 19, 2010 at 6:44 PM, Stephen Liu <satimis at yahoo.com>  
> wrote:
>> Hi folks,
>>
>> Win7 64bit
>> R 1.12.0
>>
>> I run following command on R:-
>>
>>> ToothGrowth
>>> attach(ToothGrowth)
>>> plot(dose,len)
>>> matrics=lm(len~dose)
>>
>>> abline(metrics)
>> Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
>> plot.new has not been called yet
>>
>> Only a grey diagram is displayed without content
>>
>>
>>> plot(abline(metrics))
>> Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :
>> plot.new has not been called yet
>>
>> With the same result.
>>
>>
>> Pls advise what does it mean?  How to rectify it?  TIA
>>
>>
>> B.R.
>> Stephen L
>>
>>
>>
>>
>> ______________________________________________
>> R-help at 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.
>>
>
>
>
> -- 
> Joshua Wiley
> Ph.D. Student, Health Psychology
> University of California, Los Angeles
> http://www.joshuawiley.com/
>
>
>
>
> ______________________________________________
> R-help at 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.

David Winsemius, MD
West Hartford, CT





More information about the R-help mailing list