[BioC] RGraphviz

Sim, Fraser Fraser_Sim at URMC.Rochester.edu
Sat Apr 18 22:14:10 CEST 2009


Hi Florian,

The new normal arrows look great but their orientation is not correct
for some of the egdes. I ran the same code as below in 2.9.0. The edges
a~d, d~e, b~d are fine but a~b, c~d and c~e are reversed with the arrow
pointing in the wrong direction back up the edge.

I took a look at the source code but couldn't see the problem
immediately but didn't know what the 'out' variable meant and why it was
necessary for the normal arrow but none of the other arrowhead types. It
looked like if it was set the arrow would rotate 180 degrees and maybe
cause the problem but I'm just guessing here.

The rankdir problem is fixed, thanks.

Thanks for your help,
Fraser

Note: I am using graphviz version 2.21.20090302.545 because 2.22 didn't
work with your code. Earlier versions of graphviz crash on Vista 64-bit.
The Rgraphviz binary did not work on my system so I had to build the new
version (1.21.11) from source. It built fine with no errors and I can
make graphs ok.

Here's my sessionInfo:
R version 2.9.0 (2009-04-17) 
i386-pc-mingw32 

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] grid      stats     graphics  grDevices datasets  utils     methods

[8] base     

other attached packages:
[1] Rgraphviz_1.21.11 graph_1.21.7      rcom_2.1-3        rscproxy_1.3-1


loaded via a namespace (and not attached):
[1] cluster_1.11.13 tools_2.9.0    

-----Original Message-----
From: Florian Hahne [mailto:fhahne at fhcrc.org] 
Sent: Thursday, April 16, 2009 7:31 PM
To: Sim, Fraser
Cc: bioconductor at stat.math.ethz.ch
Subject: Re: [BioC] RGraphviz

Sim, Fraser wrote:
> Hi Florian,
>
> Here is some example code:
>
> library(Rgraphviz)
> set.seed(123)
> V <- letters[1:5]
> M <- 1:2
> g1 <- randomGraph(V, M, 0.5)
> edgemode(g1) <- "directed"
> x <- layoutGraph(g1)
>
> edgeRenderInfo(x) = list(arrowhead = "tee")
> renderGraph(x)
>
> edgeRenderInfo(x) = list(arrowhead = "normal")
> renderGraph(x)
>
> The first graph rendering is correct with arrowhead converted to
tee's.
> The second generates open arrowheads more like the 'vee' according to
> the graphviz documentation. Also if you run the code with 'vee' there
is
> no difference from 'normal'.
>   
The base R graphics arrow function doesn't know how to draw filled arrow

heads. And since all Rgraphviz plotting is done using base graphics, the

"normal" arrow shape was more like the 'vee' shape in Graphviz. I added 
filled arrowheads to the latest Rgraphviz devel version (1.21.11), and 
these are used as the default now. Things get a bit ugly once you start 
resizing the X11 device, but that problem was there before, it's just 
easier to spot for the filled arrow heads. Note that you will only get 
those when you use the new layoutGraph/renderGraph interface.
> It appears that some of the other shapes are also not supported and
> revert back to the standard. I understand that not all shapes may be
> supported but it would be more intuitive if the renderGraph produced
an
> error or warning for non-supported shapes rather than just silently
> reverting them to an open arrow.
>   
You will now get a warning when using a non-supported arrow head type. 
We still fall back to the default arrowhead, which is a good thing, I
think.

Bw,
Florian
> Thanks,
> Fraser
>
> -----Original Message-----
> From: Florian Hahne [mailto:fhahne at fhcrc.org] 
> Sent: Tuesday, April 14, 2009 7:09 PM
> To: Sim, Fraser
> Cc: bioconductor at stat.math.ethz.ch
> Subject: Re: [BioC] RGraphviz
>
> Hi Fraser,
> could you provide a reproducible example for us to take  look. From  
> your post I can't tell how or where you tried to set the symbols.
> Cheers,
> Florian
>
>
> On 14.04.2009, at 14:09, Sim, Fraser wrote:
>
>   
>> Hi all,
>>
>> I am trying to set custom arrowheads in a graphviz-based plot. It I  
>> set
>> to "tee" or "dot", I get the expected symbols.
>>
>> However, if I use "normal", I do not get a closed arrowhead and  
>> there is
>> no difference between "normal" and "vee" arrowheads.
>>
>> Any idea why?
>>
>> Cheers,
>> Fraser
>>
>> sessionInfo:
>> R version 2.8.1 (2008-12-22)
>> i386-pc-mingw32
>>
>> locale:
>> LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
>> States.1252;LC_MONETARY=English_United
>> States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
>>
>> attached base packages:
>> [1] grid      stats     graphics  grDevices utils     datasets   
>> methods
>>
>> [8] base
>>
>> other attached packages:
>> [1] Rgraphviz_1.21.7 graph_1.20.0     rcom_2.0-4
rscproxy_1.0-12
>>
>> loaded via a namespace (and not attached):
>> [1] cluster_1.11.12 tools_2.8.1
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>>     
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>   


-- 
Florian Hahne, PhD
Computational Biology Program
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
PO Box 19024
Seattle, Washington 98109-1024
206-667-3148
fhahne at fhcrc.org



More information about the Bioconductor mailing list