circular bubble digraph

Circular bubble digraph for weighted directed graphs. Nodes on circle, edges as curved ribbons. Supports grouping, labels & colorbar.

您现在正在关注此提交

Baisc usage
% Generate skew-symmetric adjacency matrix A(i,j) = -A(j,i)
Data = (rand(50) - 0.5) .* (rand(50) > 0.99);
Data = tril(Data) - tril(Data)';
% Generate random group IDs (1 to 5) for 50 nodes
ids = randi([1, 5], [1, 50]);
% Sort nodes by group ID for contiguous grouping
[ids, ind] = sort(ids);
Data = Data(ind, ind);
% Create node labels: 'N-1', 'N-2', ..., 'N-50'
labels = compose('N-%d', 1:50);
% Create circular bubble digraph object and draw
CBD = circBubbleDigraph(Data, 'Group', ids, 'NodeName', labels);
CBD.draw();
Data = (rand(50) - 0.5) .* (rand(50) > 0.99);
Data = tril(Data) - tril(Data)';
ids = randi([1, 5], [1, 50]);
[ids, ind] = sort(ids);
Data = Data(ind, ind);
labels = compose('N-%d', 1:50);
CBD = circBubbleDigraph(Data, 'Group', ids, 'NodeName', labels);
% Change node color
CBD.CData = lines(5);
CBD.draw();
% Set edge colormap to 'cool'
colormap(cool)
% Add colorbar
CB = CBD.colorbar;
Adding and adjusting node labels and group labels
Data = (rand(100) - .5).*(rand(100) > .995);
Data = tril(Data) - tril(Data)';
ids = randi([1, 10], [1, 100]);
[ids, ind] = sort(ids);
Data = Data(ind, ind);
% Create labels: 'N-1' to 'N-100' for nodes, 'Group-A' to 'Group-J' for groups
nLabels = compose('N-%d', 1:100);
gLabels = compose('Group-%c', 'A':'J');
CBD = circBubbleDigraph(Data);
% Set custom properties
CBD.Group = ids; % Group assignment for each node
CBD.NodeName = nLabels; % Node labels
CBD.GroupName = gLabels; % Group labels
CBD.NodeLabelRadius = 1.1; % Distance of node labels from center
CBD.GroupLabelRadius = 1.3; % Distance of group labels from center
CBD.Curvature = 0.8; % Edge curvature (0 = straight, 1 = full Bezier)
CBD.draw();
CBD.setClassLabel('Color', [0,0,.8])
CBD.setNodeLabel('Color',[79,148,204]./255)

引用格式

Zhaoxu Liu / slandarer (2026). circular bubble digraph (https://ww2.mathworks.cn/matlabcentral/fileexchange/125140-circular-bubble-digraph), MATLAB Central File Exchange. 检索时间: .

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
2.0.4

Fixed bugs in demo3 and resolved the issue where property settings might not be applied to obj.ax.

2.0.3

more description
more description

2.0.2

more description
more description

2.0.1

Change cover.

2.0.0

New version
New virson

1.6.0

change 'flat' into 'interp'

1.5.0

Fixed a bug about line direction

1.0.0