[rkward-cvs] SF.net SVN: rkward:[2966] trunk/rkward/rkward/rbackend/rpackages/rkward/R/ internal_graphics.R

kapatp at users.sourceforge.net kapatp at users.sourceforge.net
Thu Aug 26 06:31:05 UTC 2010


Revision: 2966
          http://rkward.svn.sourceforge.net/rkward/?rev=2966&view=rev
Author:   kapatp
Date:     2010-08-26 06:31:05 +0000 (Thu, 26 Aug 2010)

Log Message:
-----------
Add lattice graphics to history. But first, put in a hook for print.trellis.

Modified Paths:
--------------
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R	2010-08-07 16:57:08 UTC (rev 2965)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R	2010-08-26 06:31:05 UTC (rev 2966)
@@ -96,4 +96,16 @@
 {
 	assignInNamespace ("plot.new", plot.new, envir=as.environment ("package:graphics"))
 	assignInNamespace ("dev.off", dev.off, envir=as.environment ("package:grDevices"))
+	
+	## set a hook defining "print.function" for lattice:
+	setHook (packageEvent ("lattice", "onLoad"),
+		function (...)
+			lattice::lattice.options (print.function = function (x, ...)
+			{
+				if (dev.cur() == 1) rk.screen.device ()
+				rk.record.plot$record ()
+				plot (x, ...)
+				invisible ()
+			})
+	)
 }


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