[R] Plotting NLS profiles

Sam Stewart rhelp.stats at gmail.com
Fri Jun 10 21:02:51 CEST 2011


Wow, that's really clever, I didn't know you could manipulate the
palette like that.

Thanks Dr Ripley,
Sam

On Fri, Jun 10, 2011 at 3:45 PM, Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:
> On Fri, 10 Jun 2011, Prof Brian Ripley wrote:
>
>> On Fri, 10 Jun 2011, R Help wrote:
>>
>>> Hello list,
>>>
>>> I'm trying to plot nls profiles, but the plot.profile.nls function in
>>> R doesn't seem to accept any plot.default variables.  Specifically,
>>> I'd like to be able to change the x-axis title and the colors to black
>>> and white.  Has anyone had any luck with this?
>>>
>>> If not, is there a way to override to plotting colors, perhaps in par()?
>>
>> No.  The authors hardcoded all these.
>>
>> Take a copy of the function and modify it to suit your purposes.
>
> But as they hardcoded the colours to numbers, see ?palette .
>
>>> Thanks,
>>> Sam
>>>
>>> fm1 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
>>> pr1 <- profile(fm1, alpha = 0.05)
>>> opar <- par(mfrow = c(2,2), oma = c(1.1, 0, 1.1, 0), las = 1)
>>> plot(pr1, conf = c(95, 90, 80, 50)/100) # works fine
>>> plot(pr1, conf = c(95, 90, 80, 50)/100,xlab=expression(theta),col=1) #
>>> doesn't change
>
> --
> 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
>



More information about the R-help mailing list