<snip> > So instead of: > > > mypng() > > x=c(1,2,3) > > plot(x,x) > > I can just do: > > > x=c(1,2,3) > > plot(x,x) Isn't that what you can do after you define mypng and set options(device = "mypng") ?