Graph2P.plotLiveGraph(dt, size=(12, 8), probX=True, probY=True, **kwargs)

Creates a live, updated plot of probability vs node superimposed on a 3D visualisation of the graph vertices.

  • dt (str) – the amount of time to ‘sleep’ before resuming the program. This can be used to ‘slow down’ propagation, providing time to view small changes on the graph.
  • size (tuple) – size=(x,y) sets the horizontal and vertical size of the output figure.
Keyword Arguments:

: For available keyword arguments, see :func:`Graph2P.plotGraph`.


  • Once the live plot is no longer needed, Graph.clearLiveGraph() should be called in order to destroy the live plot object (this will not close the plot window).
  • if propagate() has not been called, the probability of the initial state is plotted (\(t=0\)). Otherwise, the last propagated time (Graph2P.t) is used.


This feature attempts to uses matplotlib in a sort of hackish way and is not well tested - your mileage may vary.