Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-15 Thread Christos Hatzis
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Clausen > Sent: Sunday, March 16, 2008 12:05 AM > To: Duncan Murdoch > Cc: R-devel@r-project.org > Subject: Re: [Rd] [patch] add=TRUE in plot.default() > > Hi Duncan, >

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-15 Thread Andrew Clausen
Hi Duncan, On Mon, Mar 10, 2008 at 08:51:23AM -0400, Duncan Murdoch wrote: > >The add parameter only interacts with other parameters superficially -- > >some parameters of "plot" (like log) are related to the shape of the axes, > >and should be inherited from what is on the plot already. > > I'd

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-10 Thread Duncan Murdoch
On 3/9/2008 5:58 PM, Andrew Clausen wrote: > On Sun, Mar 09, 2008 at 04:04:08PM -0400, Duncan Murdoch wrote: >> Part of the reason I didn't like your patch is that it was incomplete: >> it didn't patch the plot.default.Rd file. > > Fair enough -- I wasn't sure whether I was fixing a bug or not.

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-09 Thread Gabor Grothendieck
Its not a matter of desirable or not -- its a matter that its a different point. The par(new= ) to get an old graph is completely confusing and its annoying that one has to suddenly switch to lines and points and cannot consistently use plot. That remains true whether or not there is auto expansi

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-09 Thread hadley wickham
> > But what about when the new data is outside the range of the current > > plot? > > plot/lines/points already works that way so this is just an interface issue. That may be the way it is, but I don't see how you could argue that it's desirable behaviour. Hadley -- http://had.co.nz/

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-09 Thread Gabor Grothendieck
On Sun, Mar 9, 2008 at 6:27 PM, hadley wickham <[EMAIL PROTECTED]> wrote: > > Yes. The ability to plot things on top of each other is important. > > The simplicity created by having a single interface for adding to plots > > outweighs the complexity of yet another parameter. > > > > The add pa

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-09 Thread hadley wickham
> Yes. The ability to plot things on top of each other is important. > The simplicity created by having a single interface for adding to plots > outweighs the complexity of yet another parameter. > > The add parameter only interacts with other parameters superficially -- > some parameters of

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-09 Thread Andrew Clausen
On Sun, Mar 09, 2008 at 04:04:08PM -0400, Duncan Murdoch wrote: > Part of the reason I didn't like your patch is that it was incomplete: > it didn't patch the plot.default.Rd file. Fair enough -- I wasn't sure whether I was fixing a bug or not. ("..." spreads the documentation around a bit.) >

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-09 Thread Duncan Murdoch
On 09/03/2008 12:46 PM, Andrew Clausen wrote: > Hi Duncan, > > On Sun, Mar 09, 2008 at 12:11:45PM -0400, Duncan Murdoch wrote: >> It has never been claimed that it would work, and as far as I can see, >> it doesn't make anything easier: the last line could be replaced by >> >> lines(X, f(X), col

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-09 Thread Gabor Grothendieck
I agree with Andrew's viewpoint. These changes would make R easier to use. On Sun, Mar 9, 2008 at 12:46 PM, Andrew Clausen <[EMAIL PROTECTED]> wrote: > Hi Duncan, > > On Sun, Mar 09, 2008 at 12:11:45PM -0400, Duncan Murdoch wrote: > > It has never been claimed that it would work, and as far as I

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-09 Thread Andrew Clausen
Hi Duncan, On Sun, Mar 09, 2008 at 12:11:45PM -0400, Duncan Murdoch wrote: > It has never been claimed that it would work, and as far as I can see, > it doesn't make anything easier: the last line could be replaced by > > lines(X, f(X), col="red") > > for more clarity from less typing. So why

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-09 Thread Andrew Clausen
Hi Henrique, Sorry I wasn't very clear. I should have said that I think it's nice that add=TRUE works for some things, like plot(f) plot(g, add=TRUE) I think it's a convenient and simple way of adding things to a plot. But this add=TRUE trick doesn't work for everything, and I

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-09 Thread Duncan Murdoch
On 08/03/2008 10:11 PM, Andrew Clausen wrote: > Hi all, > > As long as I've used R, add=TRUE hasn't worked in contexts like this: > > f <- function(x) x^2 > X <- seq(0, 1, by=1/4) > plot(f, col="blue") > plot(X, f(X), col="red", type="l", add=TRUE) > > I attached a fix fo

Re: [Rd] [patch] add=TRUE in plot.default()

2008-03-09 Thread Henrique Dallazuanna
I think you can use par(new = T) here: f <- function(x) x^2 X <- seq(0, 1, by=1/4) plot(f, col="blue") par(new = T) plot(X, f(X), col="red", type="l", xlab="", ylab="") On 09/03/2008, Andrew Clausen <[EMAIL PROTECTED]> wrote: > Hi all, > > As long as I've used R, add=TRUE hasn't worked in context

[Rd] [patch] add=TRUE in plot.default()

2008-03-08 Thread Andrew Clausen
Hi all, As long as I've used R, add=TRUE hasn't worked in contexts like this: f <- function(x) x^2 X <- seq(0, 1, by=1/4) plot(f, col="blue") plot(X, f(X), col="red", type="l", add=TRUE) I attached a fix for version 2.6.2. Cheers, Andrew diff --git a/src/library