Hi,

 I am making DAG graphs for gene ontologies using  GOGraph.
I color the nodes (elliptic) with different colors depending on the p-values
that I get for the
ontogy represented in the node from hyperGTest.
I would like to add a key color scale on the bottom left or right of the
graph.

For this I need to position it and scale it so that it does not overlaps
with the graph itself.
How can I get the position of the nodes in the graphic window ? and the size
of the ellipses?


This is the code I am using:

basic_graph                      <- GOGraph(goid, GOBPPARENTS) ## Biological
process´

Attrs                                <- list()
node_color                       <- c(rep(NA,length(nodes(basic_graph))))
node_color[1:length(goid)] <- heat.colors(length(goid))
Attrs$fillcolor                    <- node_color
node_fontsize                  <- c(rep(100,length(nodes(basic_graph))))
Attrs$fontsize                   <- node_fontsize
node_shape                     <- rep("ellipse", length(nodes(basic_graph)))
Attrs$shape                     <- node_shape
node_fixedsize                 <- rep(FALSE, length(nodes(basic_graph)))
Attrs$fixedsize                 <- node_fixedsize

Attrs                         <- lapply(Attrs, function(x) {
names(x)                   <- nodes(basic_graph)
x
})

basic_nodes        <- buildNodeList(basic_graph, nodeAttrs = Attrs)
basic_edges        <- buildEdgeList(basic_graph)


colored_graph      <- agopen(name = "foo", nodes = basic_nodes, edges =
basic_edges, edgeMode = "undirected")

plot(colored_graph)

Regards



Marco Zucchelli

	[[alternative HTML version deleted]]

