setNodeSizes (networkvisualizer)

index

setNodeSizes (networkvisualizer)

Set the node sizes of a networkvisualizer object.

Syntax

net = setNodeSizes(net, k)
net = setNodeSizes(net, 'auto')
net = setNodeSizes(net, 'manual')
net = setNodeSizes(net, values)
net = setNodeSizes(net, values, categories)
net = setNodeSizes(net, values, categories, classname)

Arguments

Description

Examples

Setting the node sizes

rng(1, 'twister'); % For reproducibility
W = [0 1 1 0 0;1 0 0 1 1;1 0 0 0 0;0 0 0 0 1;1 0 1 0 0];
net = networkvisualizer(W);
net = setNodeSizes(net, 15);
plot(net);

which produces:

Updating node sizes using classes

categories = {'M', 'L', 'K', 'M', 'M'}';
net = addNodeClass(net, categories);
net = setNodeLabels(net, {'Category M'}, 'M');
net = setNodeSizes(net, 20, 'M');
plot(net);

which produces:

See Also

networkvisualizer, addNodeClass, setNodeLabels, setNodeFontSize