Re: [R] Plot availability

2008-09-20 Thread john crepezzi
hadley, thanks for the example, that put it much better into perspective. I'm gonna make some coffee and read through this page and see how deep it goes. I might even be able to use this for some other things we're doing. Thanks! --John Crepezzi hadley wickham wrote: > I really would encourage

Re: [R] Plot availability

2008-09-19 Thread hadley wickham
I really would encourage you to look at ggplot2 before trying to create something of your own. Your example would convert to the following ggplot2 code: df <- data.frame(x = 0:3, y = 3:0) plot <- ggplot() + xlim(-3, 3) + ylim(-3, 3) + opts(main = "Hello World") plot + geom_line(aes(x=x, y=y), df

Re: [R] Plot availability

2008-09-19 Thread john crepezzi
I believe I've found a way to wrap and use dev.cur()[[1]] to have the desired effect. I'm just leaving my terminal now, but I'll post these results on monday so everyone can see how it turned out. If you have any ideas or qualms with this method, please let me know. Thanks Duncan! --john On Sep

Re: [R] Plot availability

2008-09-19 Thread Gabor Grothendieck
On Fri, Sep 19, 2008 at 2:00 PM, john crepezzi <[EMAIL PROTECTED]> wrote: > I'm not so sure the original way I stated my issue was clear enough, > so I'll attempt to elaborate a little bit. > > I'd like to make a function that is passed the name of a plot object, > and a lines/point specification,

Re: [R] Plot availability

2008-09-19 Thread hadley wickham
On Fri, Sep 19, 2008 at 1:00 PM, john crepezzi <[EMAIL PROTECTED]> wrote: > I'm not so sure the original way I stated my issue was clear enough, > so I'll attempt to elaborate a little bit. > > I'd like to make a function that is passed the name of a plot object, > and a lines/point specification,

Re: [R] Plot availability

2008-09-19 Thread john crepezzi
I'm not so sure the original way I stated my issue was clear enough, so I'll attempt to elaborate a little bit. I'd like to make a function that is passed the name of a plot object, and a lines/point specification, and graphs them all on the same plot. I don't want to redraw the plot each time, a

Re: [R] Plot availability

2008-09-19 Thread Duncan Murdoch
On 9/19/2008 9:32 AM, john crepezzi wrote: Is it possible to see if a plot is already open before I call lines()? I don't think so. You can see if a graphics device is open by looking at dev.cur(), but I don't think there's a test for plot.new(). I'd just wrap the call in try() if you're no

[R] Plot availability

2008-09-19 Thread john crepezzi
Is it possible to see if a plot is already open before I call lines()? -- View this message in context: http://www.nabble.com/Plot-availability-tp19572437p19572437.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org m