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

2008-03-15 Thread Christos Hatzis
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, On Mon, Mar 10, 2008 at 08:51:23AM -0400, Duncan Murdoch wrote: The add

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 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 contexts like this:

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 for version 2.6.2.

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=red)

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.) That

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 parameter

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
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

[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