view (biograph)

Draw figure from biograph object

Syntax

view(BGobj)
BGobjHandle = view(BGobj)

Arguments

BGobj

Biograph object created with the function biograph.

Description

view(BGobj) opens a Figure window and draws a graph represented by a biograph object (BGobj). When the biograph object is already drawn in the Figure window, this function only updates the graph properties.

BGobjHandle = view(BGobj) returns a handle to a deep copy of the biograph object (BGobj) in the Figure window. When updating an existing figure, you can use the returned handle to change object properties programmatically or from the command line. When you close the Figure window, the handle is no longer valid. The original biograph object (BGobj) is left unchanged.

Examples

  1. Create a biograph object.

    cm = [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];
    bg = biograph(cm)
  2. Render the biograph object into a Handles Graphic figure and get back a handle.

    h = view(bg)
  3. Change the color of all nodes and edges.

    set(h.Nodes,'Color',[.5 .7 1])
    set(h.Edges,'LineColor',[0 0 0])

More About

Was this topic helpful?