The GraphVisualizer class#

Aliases#

halerium.core.GraphVisualizer
halerium.core.visualization.GraphVisualizer
class GraphVisualizer(graph=None, positions=None, annotations=None)#

Visualise graph.

Visualize graph.

Parameters:
  • graph (Graph, optional) – The graph to visualize. The default is None.

  • positions (dict, optional) – The positions to show elements in the graph. The default is None.

  • annotations (optional) – A list of objects that provide annotations for graph elements. The default is None.

discard_positions()#

Discard positions in memory.

show(graph=None, positions=None, annotations=None, discard_old_positions=False)#

Send graph to gui for visualization.

Parameters:
  • graph (Graph, optional) – The graph to visualize. The default is None. Then the graph previously shown by this instance will be shown again. If no graph has been shown before, the graph provided upon initialization will be shown. If no graph was provided then, an exception is raised.

  • positions (dict, optional) – The positions to show elements in the graph. The default is None.

  • annotations (optional) – A list of objects that provide annotations for graph elements. The default is None.

  • discard_old_positions (bool, optional) – Whether to discard any old positions in memory or the gui. The default is False.