biograph
(Removed) Create biograph object
biograph
has been removed. Use graph
or digraph
instead. For details, see Version History.
Syntax
BGobj
=
biograph(CMatrix
)
BGobj
=
biograph(CMatrix
, NodeIDs
)
BGobj
=
biograph(CMatrix
, NodeIDs
,
...'ID', IDValue
, ...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'Label', LabelValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'Description', DescriptionValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'LayoutType', LayoutTypeValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'EdgeType', EdgeTypeValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'Scale', ScaleValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'LayoutScale', LayoutScaleValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'EdgeTextColor', EdgeTextColorValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'EdgeFontSize', EdgeFontSizeValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'ShowArrows', ShowArrowsValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'ArrowSize', ArrowSizeValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'ShowWeights', ShowWeightsValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'ShowTextInNodes', ShowTextInNodesValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'NodeAutoSize', NodeAutoSizeValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'NodeCallback', NodeCallbackValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'EdgeCallback', EdgeCallbackValue
,
...)
BGobj
= biograph(CMatrix
, NodeIDs
,
...'CustomNodeDrawFcn', CustomNodeDrawFcnValue
,
...)
Arguments
CMatrix | Full or sparse square matrix that acts as a connection matrix. That is,
a value of 1 indicates a connection between nodes while a
0 indicates no connection. The number of rows/columns
is equal to the number of nodes. |
NodeIDs | Node labels. Enter any of the following:
Default values are the row or column numbers. Note You must specify
|
IDValue
| Character vector or string to identify the biograph object. Default is
'' . |
LabelValue | Character vector or string to label the biograph object. Default is
'' . |
DescriptionValue | Character vector or string that describes the biograph object. Default
is '' . |
LayoutTypeValue
| Character vector or string that specifies the algorithm for the layout engine. Choices are:
|
EdgeTypeValue | Character vector or string that specifies how edges display. Choices are:
Note Curved or segmented edges occur only when necessary to avoid
obstruction by nodes. Biograph objects with
|
ScaleValue
| Positive number that post-scales the node coordinates. Default is
1 . |
LayoutScaleValue | Positive number that scales the size of the nodes before calling the
layout engine. Default is 1 . |
EdgeTextColorValue | Three-element numeric vector of RGB values. Default is [0, 0,
0] , which defines black. |
EdgeFontSizeValue | Positive number that sets the size of the edge font in points. Default
is 8 . |
ShowArrowsValue | Controls the display of arrows for the edges. Choices are
'on' (default) or 'off' . |
ArrowSizeValue | Positive number that sets the size of the arrows in points. Default is
8 . |
ShowWeightsValue | Controls the display of text indicating the weight of the edges. Choices
are 'on' or 'off' (default). |
ShowTextInNodesValue | Character vector or string that specifies the node property used
to label nodes when you display a biograph object using the
|
NodeAutoSizeValue | Controls precalculating the node size before calling the layout engine.
Choices are 'on' (default) or 'off' . Note Set it to |
NodeCallbackValue | User callback for all nodes. Enter the name of a function, a function
handle, or a cell array with multiple function handles. After using the
view function to display the biograph in the
Biograph Viewer, you can double-click a node to activate the first callback,
or right-click and select a callback to activate. Default is
@(node) inspect(node) , which displays the Property
Inspector dialog box. |
EdgeCallbackValue | User callback for all edges. Enter the name of a function, a function
handle, or a cell array with multiple function handles. After using the
view function to display the biograph object in the
Biograph Viewer, you can right-click and select a callback to activate.
Default is the anonymous function, @(edge) inspect(edge) ,
which displays the Property Inspector dialog box. |
CustomNodeDrawFcnValue | Function handle to a customized function to draw nodes. Default is
[] . |
Description
creates a biograph object, BGobj
=
biograph(CMatrix
)BGobj
, using a connection matrix,
CMatrix
. All nondiagonal and positive entries in the
connection matrix, CMatrix
, indicate connected nodes, rows
represent the source nodes, and columns represent the sink nodes.
specifies the node labels. BGobj
=
biograph(CMatrix
, NodeIDs
)NodeIDs
can be:
Cell array of character vectors or string vector with the number of character vectors (or strings) equal to the number of rows or columns in the connection matrix
CMatrix
. Each character vector or string must be unique.Character array with the number of rows equal to the number of nodes. Each row in the array must be unique.
Character vector or string with the number of characters equal to the number of nodes. Each character must be unique.
Default values are the row or column numbers.
Note
If you want to specify property name/value pairs, you must specify
NodeIDs
. Set NodeIDs
to
[]
to use the default values of the row/column numbers.
calls BGobj
= biograph(...,
'PropertyName
', PropertyValue
,
...)biograph
with optional properties that use
property name/property value pairs. You can specify one or more properties in any order.
Each PropertyName
must be enclosed in single quotation marks and
is case insensitive. These property name/property value pairs are as follows:
specifies an ID for the biograph object. Default is BGobj
=
biograph(CMatrix
, NodeIDs
,
...'ID', IDValue
, ...)''
.
specifies a label for the biograph object. Default is BGobj
= biograph(CMatrix
, NodeIDs
,
...'Label', LabelValue
,
...)''
.
specifies a description of the biograph object. Default is BGobj
= biograph(CMatrix
, NodeIDs
,
...'Description', DescriptionValue
,
...)''
.
specifies the algorithm for the layout engine. BGobj
= biograph(CMatrix
, NodeIDs
,
...'LayoutType', LayoutTypeValue
,
...)
specifies how edges display.BGobj
= biograph(CMatrix
, NodeIDs
,
...'EdgeType', EdgeTypeValue
,
...)
post-scales the node coordinates. Default is BGobj
= biograph(CMatrix
, NodeIDs
,
...'Scale', ScaleValue
,
...)1
.
scales the size of the nodes before calling the layout engine. Default is
BGobj
= biograph(CMatrix
, NodeIDs
,
...'LayoutScale', LayoutScaleValue
,
...)1
.
specifies a three-element numeric vector of RGB values. Default is BGobj
= biograph(CMatrix
, NodeIDs
,
...'EdgeTextColor', EdgeTextColorValue
,
...)[0, 0,
0]
, which defines black.
sets the size of the edge font in points. Default is BGobj
= biograph(CMatrix
, NodeIDs
,
...'EdgeFontSize', EdgeFontSizeValue
,
...)8
.
controls the display of arrows for the edges. Choices are BGobj
= biograph(CMatrix
, NodeIDs
,
...'ShowArrows', ShowArrowsValue
,
...)'on'
(default)
or 'off'
.
sets the size of the arrows in points. Default is BGobj
= biograph(CMatrix
, NodeIDs
,
...'ArrowSize', ArrowSizeValue
,
...)8
.
controls the display of text indicating the weight of the edges. Choices are
BGobj
= biograph(CMatrix
, NodeIDs
,
...'ShowWeights', ShowWeightsValue
,
...)'on'
(default) or 'off'
.
specifies the node property used to label nodes when you display a biograph object using
the BGobj
= biograph(CMatrix
, NodeIDs
,
...'ShowTextInNodes', ShowTextInNodesValue
,
...)view
method.
controls precalculating the node size before calling the layout engine. Choices are
BGobj
= biograph(CMatrix
, NodeIDs
,
...'NodeAutoSize', NodeAutoSizeValue
,
...)'on'
(default) or 'off'
.
specifies user callback for all nodes.BGobj
= biograph(CMatrix
, NodeIDs
,
...'NodeCallback', NodeCallbackValue
,
...)
specifies user callback for all edges.BGobj
= biograph(CMatrix
, NodeIDs
,
...'EdgeCallback', EdgeCallbackValue
,
...)
specifies function handle to customized function to draw nodes. Default is
BGobj
= biograph(CMatrix
, NodeIDs
,
...'CustomNodeDrawFcn', CustomNodeDrawFcnValue
,
...)[]
.