This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to rotate chordDiagram in library circlize?

I made a nice chord diagram with circlize library in R which looks like this: original plot,

but I want it to rotate it to look it like this:

rotated plot.

How do I do it in R with this package?

chroddiagram circlize

2 answers

Perhaps set start.degree in circos.par:

> library(circlize)
> circos.par(start.degree = 123)
> circos.initialize(...)
...

Or print out a PDF or SVG and rotate it in Adobe Illustrator.

If you want to put the circle vertically symmetric, you need to calculate a proper start.degree. In the plot, small gap and big gap are fixed values. The remaining of the circle are filled according to rowSums(abs(mat)) and colSums(abs(mat)). With these values, you can simply calculate a proper start.degree.

I have written a post of how to rotate the circle to make it looks horizontal or vertical.

http://zuguang.de/blog/html/put_chord_diagram_symmetric.html

Log in to answer this question.