# plotGraph¶

Graph2P.plotGraph(size=(12, 8), probX=True, probY=True, output=None, **kwargs)

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

Parameters: Keyword Arguments: output (str) – the absolute/relative path to the desired output file. probX (bool) – if set to True (default), the particle 1 marginale probability is represented as bars placed on each graph vertex. probY (bool) – if set to True (default), the particle 2 marginal probability is represented as bars placed below each graph vertex. size (tuple) – size=(x,y) sets the horizontal and vertical size of the output figure. nodesize (float) – size of the vertices in the plot. If left blank, this is determined automatically. nodecolor (str) – vertex color (default 'red'). For more details on how to specify a color, see the matplotlib documentation. nodealpha (float) – value between 0 and 1 specifying the vertex opacity (default 0.25) nodetext (bool) – if set True, the vertices are labelled by number. nodetextcolor (str) – vertex label text color (default 'black'). nodetextbg (str) – vertex label background color (default 'None'). ntofffset (array of floats) – the $$(x,y,z)$$ vertex label offset relative to the vertex (default [0.,0.,-0.15]). barscaleP (float) – scaled height of the probability bars (default 1). barcolorP (str) – probability bar color (default 'green'). baralphaP (float) – value between 0 and 1 specifying the opacity (default 0.25) bartext (bool) – if set True, the probability bars are labelled with their value. bartextcolorP (str) – probability label text color (default 'black'). bartextbgP (str) – probability label background color (default 'None'). btoffsetP (array of floats) – the $$(x,y,z)$$ probability label offset relative to the top of the probability bars (default [-0.025,-0.025,+-0.05])

Note

• ensure a file extension is present so that file type is correctly set (choose one of png, pdf, ps, eps or svg).
• if propagate() has not been called, the probability of the initial state is plotted ($$t=0$$). Otherwise, the last propagated time (walk.t) is used.