pyemma.plots.NetworkPlot

class pyemma.plots.NetworkPlot(A, pos=None, xpos=None, ypos=None, ax=None)

Plot of network with nodes and arcs

__init__(A, pos=None, xpos=None, ypos=None, ax=None)
Parameters
  • A (ndarray(n,n)) – weight matrix or adjacency matrix of the network to visualize

  • pos (ndarray(n,2)) – user-defined positions

  • xpos (ndarray(n,)) – user-defined x-positions

  • ypos (ndarray(n,)) – user-defined y-positions

  • ax (matplotlib Axes object, optional, default=None) – The axes to plot to. When set to None a new Axes (and Figure) object will be used.

Examples

We define first define a reactive flux by taking the following transition matrix and computing TPT from state 2 to 3.

>>> import numpy as np
>>> P = np.array([[0.8,  0.15, 0.05,  0.0,  0.0],
...               [0.1,  0.75, 0.05, 0.05, 0.05],
...               [0.05,  0.1,  0.8,  0.0,  0.05],
...               [0.0,  0.2, 0.0,  0.8,  0.0],
...               [0.0,  0.02, 0.02, 0.0,  0.96]])
>>> from pyemma import msm
>>> F = msm.tpt(msm.markov_model(P), [2], [3])

now plot the gross flux >>> NetworkPlot(F.gross_flux).plot_network() # doctest: +ELLIPSIS <…Figure…

Methods

__delattr__(name, /)

Implement delattr(self, name).

__dir__()

Default dir() implementation.

__eq__(value, /)

Return self==value.

__format__(format_spec, /)

Default object formatter.

__ge__(value, /)

Return self>=value.

__getattribute__(name, /)

Return getattr(self, name).

__gt__(value, /)

Return self>value.

__hash__()

Return hash(self).

__init__(A[, pos, xpos, ypos, ax])

param A

weight matrix or adjacency matrix of the network to visualize

__init_subclass__

This method is called when a class is subclassed.

__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

__new__(**kwargs)

Create and return a new object.

__reduce__()

Helper for pickle.

__reduce_ex__(protocol, /)

Helper for pickle.

__repr__()

Return repr(self).

__setattr__(name, value, /)

Implement setattr(self, name, value).

__sizeof__()

Size of object in memory, in bytes.

__str__()

Return str(self).

__subclasshook__

Abstract classes can override this to customize issubclass().

_draw_arrow(x1, y1, x2, y2, Dx, Dy[, label, …])

Draws a slightly curved arrow from (x1,y1) to (x2,y2).

_find_best_positions(G)

Finds best positions for the given graph (given as adjacency matrix) nodes by minimizing a network potential.

layout_automatic()

plot_network([state_sizes, state_scale, …])

Draws a network using discs and curved arrows.

Attributes

__dict__

__doc__

__module__

__weakref__

list of weak references to the object (if defined)