[英]R Circlize Chord Diagram Output
I am new to the circlize package in R. However, the output from my first chord diagram looks oval-shaped rather than a circle as shown in the documentation examples. 我不熟悉R中的circlize包。但是,我的第一个和弦图的输出看起来是椭圆形而不是圆形,如文档示例所示。 What can I do?
我能做什么? Code and image below.
代码和图片如下。
#random matrix, for illustration
mat
E1 E2 E3 E4 E5 E6
S1 8 13 18 6 11 14
S2 10 12 1 3 5 7
S3 2 16 4 17 9 15
chordDiagram(mat)
This is my output : 这是我的输出:
This is what I want : 这就是我要的 :
You need to force a squared plotting region using par(pty="s")
: 您需要使用
par(pty="s")
强制平方绘图区域:
library(circlize)
mat <- read.table(text=
",E1,E2,E3,E4,E5,E6
S1,8,13,18,6,11,14
S2,10,12,1,3,5,7
S3,2,16,4,17,9,15",header=TRUE,sep=",",row.names=1)
par(pty="s")
chordDiagram(as.matrix(mat))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.