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

kapatp at users.sourceforge.net kapatp at users.sourceforge.net
Wed Sep 1 06:51:38 UTC 2010


Revision: 2983
          http://rkward.svn.sourceforge.net/rkward/?rev=2983&view=rev
Author:   kapatp
Date:     2010-09-01 06:51:38 +0000 (Wed, 01 Sep 2010)

Log Message:
-----------
Add a hook for persp plot

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-09-01 06:41:03 UTC (rev 2982)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/internal_graphics.R	2010-09-01 06:51:38 UTC (rev 2983)
@@ -109,4 +109,14 @@
 				invisible ()
 			})
 	)
+	
+	## persp does not call plot.new (), so set a hook. Fortunately, the hook is placed after drawing the plot.
+	setHook ("persp",
+		function (...)
+		{
+			if (dev.cur() == 1) rk.screen.device ()
+			rk.record.plot$record (newplot.gType = 'standard')
+		},
+		action = "append"
+	)
 }


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