From Bill.Venables at csiro.au  Mon Jul  2 13:39:50 2007
From: Bill.Venables at csiro.au (Bill.Venables at csiro.au)
Date: Mon, 2 Jul 2007 21:39:50 +1000
Subject: [Rd] termplot with uniform y-limits
References: <B998A44C8986644EA8029CFE6396A924B67FB1@exqld2-bne.nexus.csiro.au>
	<Pine.WNT.4.64.0707021050260.3632@Petrel>
	<B998A44C8986644EA8029CFE6396A924B67FB2@exqld2-bne.nexus.csiro.au>
	<Pine.LNX.4.64.0707021208280.4748@gannet.stats.ox.ac.uk>
Message-ID: <B998A44C8986644EA8029CFE6396A924B67FB5@exqld2-bne.nexus.csiro.au>

If anyone in R-devel is having trouble seeing the point of this, try
this little example with the new code of Brian's:

dat <- data.frame(x1=1:20, x2 = sample(1:20), y = rnorm(20)+1:20)
fm <- lm(y ~ x1+x2, dat)
par(mfrow = c(2,2))
termplot(fm, se = T, partial.resid = T)
termplot(fm, se = T, partial.resid = T, ylim = "common") 


Bill Venables
CSIRO Laboratories
PO Box 120, Cleveland, 4163
AUSTRALIA
Office Phone (email preferred): +61 7 3826 7251
Fax (if absolutely necessary):  +61 7 3826 7304
Mobile:                         +61 4 8819 4402
Home Phone:                     +61 7 3286 7700
mailto:Bill.Venables at csiro.au
http://www.cmis.csiro.au/bill.venables/ 

-----Original Message-----
From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] 
Sent: Monday, 2 July 2007 9:11 PM
To: Venables, Bill (CMIS, Cleveland)
Cc: r-devel at stat.math.ethz.ch
Subject: RE: [Rd] termplot with uniform y-limits

On Mon, 2 Jul 2007, Bill.Venables at csiro.au wrote:

> Precisely.  Thanks Brian.
>
> I did do something like this but not nearly so elegantly.
>
> I suggest this become the standard version in the next release.  I
can't

Yes, that was the intention (to go into R-devel).
(It was also my intention to attach as plain text, but my Windows mailer

seems to have defeated that.)

> see that it can break any existing code.  It's a pity now we can't
make
> ylim = "common" the default.

I suspect we could if I allow a way to get the previous behaviour 
(ylim="free", I think).

Brian

> Regards,
> Bill V.
>
>
> Bill Venables
> CSIRO Laboratories
> PO Box 120, Cleveland, 4163
> AUSTRALIA
> Office Phone (email preferred): +61 7 3826 7251
> Fax (if absolutely necessary):  +61 7 3826 7304
> Mobile:                         +61 4 8819 4402
> Home Phone:                     +61 7 3286 7700
> mailto:Bill.Venables at csiro.au
> http://www.cmis.csiro.au/bill.venables/
>
> -----Original Message-----
> From: ripley at stats.ox.ac.uk [mailto:ripley at stats.ox.ac.uk]
> Sent: Monday, 2 July 2007 7:55 PM
> To: Venables, Bill (CMIS, Cleveland)
> Cc: r-devel at stat.math.ethz.ch
> Subject: Re: [Rd] termplot with uniform y-limits
>
> Is the attached the sort of thing you are looking for?
> It allows ylim to be specified, including as "common".
>
> On Mon, 2 Jul 2007, Bill.Venables at csiro.au wrote:
>
>> Does anyone have, or has anyone ever considered making, a version of
>> 'termplot' that allows the user to specify that all plots should have
>> the same y-limits?
>>
>> This seems a natural thing to ask for, as the plots share a y-scale.
> If
>> you don't have the same y-axes you can easily misread the comparative
>> contributions of the different components.
>>
>> Notes: the current version of termplot does not allow the user to
>> specify ylim.  I checked.
>>
>> 	  the plot tools that come with mgcv do this by default.  Thanks
>> Simon.
>>
>>
>> Bill Venables
>> CSIRO Laboratories
>> PO Box 120, Cleveland, 4163
>> AUSTRALIA
>> Office Phone (email preferred): +61 7 3826 7251
>> Fax (if absolutely necessary):  +61 7 3826 7304
>> Mobile:                         +61 4 8819 4402
>> Home Phone:                     +61 7 3286 7700
>> mailto:Bill.Venables at csiro.au
>> http://www.cmis.csiro.au/bill.venables/
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] termplot with uniform y-limits
Bill.Venables at csiro.au