[Roxygen-commits] r125 - pkg/sandbox

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 29 05:49:45 CEST 2008


Author: pcd
Date: 2008-07-29 05:49:45 +0200 (Tue, 29 Jul 2008)
New Revision: 125

Modified:
   pkg/sandbox/callgraph.R
Log:
failure to set size


Modified: pkg/sandbox/callgraph.R
===================================================================
--- pkg/sandbox/callgraph.R	2008-07-29 03:49:24 UTC (rev 124)
+++ pkg/sandbox/callgraph.R	2008-07-29 03:49:45 UTC (rev 125)
@@ -106,11 +106,20 @@
 
 graphviz <- function(subcalls) {
   supercalls <- ls(subcalls)
-  graph <- new('graphNEL', nodes=supercalls)
-  attrs <- list(graph=list(size=NULL))
-  nodeAttrs <- makeNodeAttrs(graph,
-                             fixedsize=FALSE,
-                             shape='ellipse')
+  graph <- new('graphNEL',
+               nodes=supercalls,
+               edgemode='directed')
+  attrs <- list(graph=list(size='24.0,24.0'),
+                edge=list(arrowhead='normal',
+                  dir='forward'),
+                node=list(fixedsize=FALSE,
+                  shape='ellipse',
+                  fontname='monospace'),
+                cluster=list())
+###   nodeAttrs <- makeNodeAttrs(graph,
+###                              fixedsize=FALSE,
+###                              shape='ellipse',
+###                              fontname='monospace')
 ###   attrs <- list(node=list(shape='ellipse',
 ###                   fixedsize=FALSE))
   for (supercall in supercalls)
@@ -119,14 +128,20 @@
 ###   plot(graph,
 ###        attrs=attrs
 ###        )
-  agraph <- agopenSimple(graph, 'roxygenize')
-  agraph <- agopen(graph,
-                   'roxygenize',
-                   nodeAttrs=nodeAttrs)
-###   graphDataDefaults(agraph, 'size') <- NULL
-  nodeDataDefaults(agraph, c('shape', 'fixedsize')) <-
-    c('ellipse', FALSE)
-  toFile(agraph,
+###   print(checkAttrs(attrs))
+  print(str(getDefaultAttrs(attrs)))
+###   agraph <- agopenSimple(graph, 'roxygenize')
+  ag <- agopen(graph,
+               'roxygenize',
+               attrs=getDefaultAttrs(attrs),
+               edgeMode='directed')
+###   print(graphData(ag))
+###   graphData(agraph, 'size') <- NULL
+###   print(graphData(agraph, 'size'))
+###   nodeDataDefaults(agraph, c('shape', 'fixedsize')) <-
+###     c('ellipse', FALSE)
+###   edgeDataDefaults(agraph, 'arrowhead') <- 'normal'
+  toFile(ag,
          layoutType='fdp',
          filename='test.ps',
          fileType='ps')



More information about the Roxygen-commits mailing list