how to rotate chordDiagram in library circlize?
2
0
Entering edit mode
7.7 years ago
Hongru • 0

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 • 3.5k views
ADD COMMENT
1
Entering edit mode
7.7 years ago

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.

ADD COMMENT
1
Entering edit mode
7.7 years ago
Zuguang Gu ▴ 220

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

ADD COMMENT

Login before adding your answer.

Traffic: 1811 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6