[BioC] two-line labels in GO graphs

Robert Castelo robert.castelo at upf.edu
Thu Mar 20 12:41:42 CET 2008

hi Joern and Florian,

the perspective of having to upgrade Graphviz has sharpened my limited
bioconductor/Rgraphviz hacking capabilities and i've found the way to
get multi-line labels using my current version of RGraphviz. i post this
just in case is of interest to anybody.

the newline character '\n' i was giving to the separator 'sep' parameter
in the paste function should be written as '\\\n'. doing it this way my
former example works:


goterms <- eapply(GOTERM,Term)
g <- GOGraph("GO:0016265",GOBPPARENTS)
g <- removeNode("all",g)
mt <- match(nodes(g),names(goterms))
nodattr <- makeNodeAttrs(g,label=paste(nodes(g),goterms[mt],sep="\\\n"),

... and no, writing '\\n' doesn't work.

i leave for the experts finding out why the backslash should be scaped
this way '\\\n'. i came across this using agopen and agwrite to write
myself a dot file to use my current version of graphviz in command-line
since i found out that it was indeed multi-line capable but then i saw
that in the dot file, the newline characters '\n' in the labels where
being interpreted instead of, let's say, quoted, so i just thgout of
trying to "escape".

best regards,


On Tue, 2008-03-18 at 18:26 +0000, Joern Toedling wrote:
> Yes, I think the dependency is stated correct. Please note that Graphviz
> 2.18 is a successor to 2.2, 2.3,...,2.17 and its version number is not
> meant as 2.1.8. So you should be alright with that version of Graphviz
> or indeed any Graphviz version >= 2.2.
> Regards,
> Joern
> Robert Castelo wrote:
> > hi Joern,
> >
> > thanks for the info. however, this latest version of Rgraphviz says that
> > it depends Graphviz version >= 2.2 at SystemRequirements level and
> > according to the url where one can download the latest Graphviz source
> > distribution:
> >
> > http://www.graphviz.org/Download_source.php
> >
> > the latest stable version is 2.18 and the development snapshot version
> > is 2.19
> >
> > is this SystemRequirements dependence correct?
> >
> > thanks,
> > robert.
> >   

More information about the Bioconductor mailing list