[rkward-cvs] SF.net SVN: rkward:[3466] trunk/rkward/rkward/rbackend/rpackages/rkward/R
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu Mar 3 17:09:42 UTC 2011
Revision: 3466
http://rkward.svn.sourceforge.net/rkward/?rev=3466&view=rev
Author: tfry
Date: 2011-03-03 17:09:42 +0000 (Thu, 03 Mar 2011)
Log Message:
-----------
Set the hook in grid.newpage instead, to cover all grid plots. Also small fix to function replacing.
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R
trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R
Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R 2011-03-03 16:52:03 UTC (rev 3465)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal.R 2011-03-03 17:09:42 UTC (rev 3466)
@@ -396,6 +396,7 @@
assign (backupname, original, envir=as.environment ("package:rkward"))
if (copy.formals) formals (replacement) <- formals (original)
+ environment (replacement) <- environment (original)
assign (functionname, replacement, envir=as.environment ("package:rkward"))
try (
if (bindingIsLocked (functionname, environment)) {
Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R 2011-03-03 16:52:03 UTC (rev 3465)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R 2011-03-03 17:09:42 UTC (rev 3466)
@@ -120,13 +120,13 @@
})
)
- setHook (packageEvent ("ggplot2", "attach"),
+ setHook (packageEvent ("grid", "attach"),
function (...)
- rk.replace.function ("print.ggplot", as.environment ("package:ggplot2"),
+ rk.replace.function ("grid.newpage", as.environment ("package:grid"),
function () {
## TODO: add specific support for ggplots?
rk.record.plot$.plot.new.hook ()
- eval (body (.rk.print.ggplot.default))
+ ret <- eval (body (.rk.grid.newpage.default))
})
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list