It is pretty easy to draw chord chart by MATLAB!!

Zhaoxu Liu / slandarer 2024-2-5
最新活动Zhaoxu Liu / slandarer 回复于 2024-2-6

I have written two tools and uploaded fileexchange, which allows us to easily draw chord diagrams:
chord chart 弦图
download:
demo:
dataMat=[2 0 1 2 5 1 2;
3 5 1 4 2 0 1;
4 0 5 5 2 4 3];
dataMat=dataMat+rand(3,7);
dataMat(dataMat<1)=0;
colName={'G1','G2','G3','G4','G5','G6','G7'};
rowName={'S1','S2','S3'};
CC=chordChart(dataMat,'rowName',rowName,'colName',colName);
CC=CC.draw();
CC.setFont('FontSize',17,'FontName','Cambria')
% 显示刻度和数值
% Displays scales and numeric values
CC.tickState('on')
CC.tickLabelState('on')
% 调节标签半径
% Adjustable Label radius
CC.setLabelRadius(1.4);
Digraph chord chart 有向弦图
download:
demo:
dataMat=randi([0,8],[6,6]);
% 添加标签名称
NameList={'CHORD','CHART','MADE','BY','SLANDARER','MATLAB'};
BCC=biChordChart(dataMat,'Label',NameList,'Arrow','on');
BCC=BCC.draw();
% 添加刻度
BCC.tickState('on')
% 修改字体,字号及颜色
BCC.setFont('FontName','Cambria','FontSize',17,'Color',[.2,.2,.2])
BCC.setLabelRadius(1.3);
BCC.tickLabelState('on')
Hans Scharler
Hans Scharler 2024-2-5
The chord File Exchange projects is great! Last week, File Exchange added support to have projects opened directly in MATLAB Online. If you add an example file, people can see the example in MATLAB Online.
Zhaoxu Liu / slandarer
Zhaoxu Liu / slandarer 2024-2-5
This glad to learn about the new features of MATLAB online, sure there ia a few examples in each projects, I tried it and the new feature is very useful
Hans Scharler
Hans Scharler 2024-2-5
If you had a getting started example, you can have it autoloaded. To select one particular file to open when people click the Open in MATLAB Online button, click the "gear" icon next to the button. This is where you can set the file.
Zhaoxu Liu / slandarer
Zhaoxu Liu / slandarer 2024-2-6
Wow,It works!!!!
Adam Danz
Adam Danz 2024-2-5
Terrific work @Zhaoxu Liu!
Not only are these terrific tools but it's also an outstanding "Tips and Tricks" discussion.
I'm interested to see examples of MATLAB users creating chord charts and hearing about its application and use-case.