This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

view (biograph)

Draw figure from biograph object


BGobjHandle = view(BGobj)



Biograph object created with the function biograph.


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.


  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

Introduced before R2006a

Was this topic helpful?