Graphs#

Force-directed graph widgets.

class ipyforcegraph.graphs.ForceGraph(**kwargs)[source]#

Bases: DOMWidget, ForceBase

Base force-directed graph widget.

Public constructor

background_color Union('rgba(0, 0, 0, 0.0)')#

the graph background color

behaviors TypedTuple()#

the behaviors that provide functionality for selection, changing the node and link shapes, changing the on-hover tooltip for nodes and links, the forces graph layout, recording of the graph state, and the particles on the links.

a default link color, which can be overridden by LinkShapes

a default link width, which can be overridden by LinkShapes

default_node_color Unicode('rgba(31, 120, 179, 1.0)')#

a default node color, which can be overridden by NodeShapes

default_node_size Float(1)#

a default node size, which can be overridden by NodeShapes

reheat()[source]#

Send the reheat command to restart the force simulation

Return type:

None

source Instance()#

the source of node and link data

class ipyforcegraph.graphs.ForceGraph3D(**kwargs)[source]#

Bases: ForceGraph

3D force-directed graph widget.

Public constructor