COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Classes | Functions | Variables
networkxpython Namespace Reference

Classes

class  nx_event_connector
 need to put things into a class to be reachable by the event callbacks More...
 

Functions

def traverse_successors_recursive (G, key, pos, y)
 custom-made layouts traditional_left2right_tree_layout(G,key,pos) traditional_left2right_tree_layout_in_polar(G,key) More...
 
def traditional_left2right_tree_layout (G, key)
 
def traditional_left2right_tree_layout_in_polar (G, key)
 
def compute_edge_angles_for_target_nodes (G, pos)
 compute angle in degree for each node at which the edge from parent node arrives More...
 
def normalize_coordinates (key_, pos_, img_)
 renormalizing positions in the range of zoomfact & root position in zoomfact it gets normalized in a way that cf3_img's pixels are 1m away frm each other and size is 1/zoomfact compared t axes dimensions also computing angles, based on the angle of the edge leading to parent node More...
 
def draw_captions
 
def draw_edges_nodes (G, pos, elist, elabel, nlist, nlabel, edgestyle, color, zord)
 draw edges and nodes More...
 
def append_with_successors_recursive (G, key, to_append)
 query data from coolfluid and build graph and lists More...
 
def build_graph_with_lists
 
def show_graph
 starturi: from where the recursive listing starts depth: how many levels to list down deep in starturi's subtree tree: what to plot in the tree. More...
 

Variables

string titlecolor = 'white'
 color settings More...
 
string bgcolor = 'black'
 
string navicolor = 'yellow'
 
string componentcolor = '#aaaaaa'
 
string optioncolor = '#2a83bd'
 
string fieldcolor = '#3a773a'
 
string signalcolor = '#aa6d00'
 
string tagcolor = '#5a5ab7'
 
string linkcolor = '#aaaaaa'
 
string propertycolor = '#cc4444'
 
string cf3_b64
 base64 coded png image for root component More...
 
tuple root = cf.Core.root()
 setting up the matplotlib layout More...
 
tuple fig = plt.figure(figsize=(10,10))
 
tuple mainax = plt.axes([0,0,1,1],axisbg=bgcolor,label='main')
 
tuple naviax = plt.axes([0.65,0.01,0.34,0.34],axisbg=bgcolor,label='navi')
 
tuple titletxt = plt.text(0.02,0.98,'',transform=mainax.transAxes, size=16, weight='bold',color=titlecolor, ha='left', va='top',zorder=50)
 
tuple cf3_png = StringIO(base64.decodestring(cf3_b64))
 
tuple cf3_img = Image.open(cf3_png)
 

Function Documentation

def networkxpython.append_with_successors_recursive (   G,
  key,
  to_append 
)

query data from coolfluid and build graph and lists

Definition at line 429 of file networkxpython.py.

def networkxpython.build_graph_with_lists (   starturi_,
  nec_,
  nxp_,
  depth_,
  tree_,
  depthlimit_sofplt = True,
  add_parent = False,
  hidden = 'cofpslt' 
)

Definition at line 434 of file networkxpython.py.

def networkxpython.compute_edge_angles_for_target_nodes (   G,
  pos 
)

compute angle in degree for each node at which the edge from parent node arrives

Definition at line 173 of file networkxpython.py.

def networkxpython.draw_captions (   G,
  pos,
  capt,
  label,
  color,
  zord,
  rotation = None,
  onlyalign = False 
)

Definition at line 383 of file networkxpython.py.

def networkxpython.draw_edges_nodes (   G,
  pos,
  elist,
  elabel,
  nlist,
  nlabel,
  edgestyle,
  color,
  zord 
)

draw edges and nodes

Definition at line 410 of file networkxpython.py.

def networkxpython.normalize_coordinates (   key_,
  pos_,
  img_ 
)

renormalizing positions in the range of zoomfact & root position in zoomfact it gets normalized in a way that cf3_img's pixels are 1m away frm each other and size is 1/zoomfact compared t axes dimensions also computing angles, based on the angle of the edge leading to parent node

Definition at line 190 of file networkxpython.py.

def networkxpython.show_graph (   starturi,
  depth = 1000,
  tree = 'cofl',
  caption = '',
  printdestination = 'c',
  hidden = 'cospflt' 
)

starturi: from where the recursive listing starts depth: how many levels to list down deep in starturi's subtree tree: what to plot in the tree.

Combination of chars 'cosfl' caption: what to label in the tree. Combination of chars 'cosfl' 'c': component 'o': option 't': tag 'p': property 's': signal 'f': field 'l': link printdestination: 'sc' if user clicks on a node, the component information is printed 's': to screen (matplotlib window) 'c': console (terminal) depthlimit_sofpl: bool option to include or exclude printing signals, options, fields, properties and links at depthlimit level hidden: wether to display or not cospfl element which has tag 'hidden' set to true

zorder numbers: 1x: edges 2x: nodes, hardcoded to edges +10 3x: captions 40: cf logo middle backdrop rectangle 41: cf logo image 50: title 51: component info

Definition at line 557 of file networkxpython.py.

def networkxpython.traditional_left2right_tree_layout (   G,
  key 
)

Definition at line 143 of file networkxpython.py.

def networkxpython.traditional_left2right_tree_layout_in_polar (   G,
  key 
)

Definition at line 157 of file networkxpython.py.

def networkxpython.traverse_successors_recursive (   G,
  key,
  pos,
  y 
)

custom-made layouts traditional_left2right_tree_layout(G,key,pos) traditional_left2right_tree_layout_in_polar(G,key)

Definition at line 98 of file networkxpython.py.

Variable Documentation

string bgcolor = 'black'

Definition at line 25 of file networkxpython.py.

string cf3_b64
Initial value:
1 = """iVBORw0KGgoAAAANSUhEUgAAADIAAAAgCAYAAABQISshAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wBFRM6KYr0o9UAA
2 AAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAJpUlEQVRYw61YT4hdVxn/fd93zr33vTeTTCZJmzY2kCGlmPQfWqQtKCIupJtCF9qFQsFVtFCycJVFyMZlSEFQcOGmxCLdqt2JqC2V0
3 mqxVlBM2iammdZmZvJm3rv3/PlcnHPvu7ex7cQ6cDn3ngyT73d/f77vXDpz5syYmVZ3dpbvWV+/7VlmPlGWghhjvgJCSPdpDZ+475zv/U6Eqg7+FgBYW6Asy5cPHJBvHTq0feX8+R/GJ598Es8//zz+1
4 x/DzPtV5cT6+h2/Xlvbh/vvPwznPJrGd2vTBDjn8r1H0/TvG9R12qtrh7pusLGxDVUdgFCNUAWstTDGgtk8PJ3aX50/f/q+J5544jOBaIHcOZ1Ovr68XODEiTswn7sBEOcCmsZ1awvEOY+6Ts9pdd0zo
5 B0bfUAiBsZYGGNgrSERe+9TT507fvTojbdeeeWVXRUcQkBd13ry5ElcunQJFy5cSEAA/Zxz/ODx47er94FS8QlAujy8Dz1gLbj+2oJPgEJYSCoxEcHMmQ2BMRYiiZkQ8Ijq1j+feeaZuBsgRIQYI4goH
6 j9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VoVgjID6Te/tvjSMCrJbEhiR4RhKIaryvInVd2MEQeJqAKUaTC+fvIoq8lIEYAT0qXeaS99XgqLY2p7ZC0NY1wa6gbAwvTmJ0FlWllxx0qRfVFYQSGMwjIqI5h7wATFFqtejDFeF5GJq
21 tp8aqRb/NhnAdzOiPeXbmtr5mXPcIYK3XkcQDcvJS+0hyXTm6MEZZEBtcbup5URVMJ4c32mMx9rM51O3fLy8haAnaZpTFmWrKp0K/NS/mA2YmZWFnzVvfbmC+ELjyQQ7QyVQLQTgVeCFYExDGGBkdQEk
22 xIICoIqEAD4CIgCEgGnAAWF14iXLs/08g1Pe+P05+aNN97Qw4cPu8lk4kejEa2trd0SCABYX1+H976JMf5bla6tYHrlK3jr4i/d0aONC2h8gGsCYlSQCMCMAMYHswBpAOEIIwwWn5IwT7xGsv45N71uT
23 yBCEBY64D546aFrL/6Y8H/6OX36tLHW7mfmewF8SZjuiUr7GuWC6ONMRt3weJMf6WOdqVAEELYJesmG+mWn/Lo5c+YMzp49+5mBhBBCURRbqvoPIvIh6jtE2FNyNJ/qN93lXu+/06jbAK558EXV+OF/A
24 OQy9FESRGTLAAAAAElFTkSuQmCC"""

base64 coded png image for root component

Definition at line 38 of file networkxpython.py.

tuple cf3_img = Image.open(cf3_png)

Definition at line 88 of file networkxpython.py.

tuple cf3_png = StringIO(base64.decodestring(cf3_b64))

Definition at line 87 of file networkxpython.py.

string componentcolor = '#aaaaaa'

Definition at line 27 of file networkxpython.py.

string fieldcolor = '#3a773a'

Definition at line 29 of file networkxpython.py.

tuple fig = plt.figure(figsize=(10,10))

Definition at line 71 of file networkxpython.py.

string linkcolor = '#aaaaaa'

Definition at line 32 of file networkxpython.py.

tuple mainax = plt.axes([0,0,1,1],axisbg=bgcolor,label='main')

Definition at line 72 of file networkxpython.py.

tuple naviax = plt.axes([0.65,0.01,0.34,0.34],axisbg=bgcolor,label='navi')

Definition at line 73 of file networkxpython.py.

string navicolor = 'yellow'

Definition at line 26 of file networkxpython.py.

string optioncolor = '#2a83bd'

Definition at line 28 of file networkxpython.py.

string propertycolor = '#cc4444'

Definition at line 33 of file networkxpython.py.

tuple root = cf.Core.root()

setting up the matplotlib layout

Definition at line 68 of file networkxpython.py.

string signalcolor = '#aa6d00'

Definition at line 30 of file networkxpython.py.

string tagcolor = '#5a5ab7'

Definition at line 31 of file networkxpython.py.

string titlecolor = 'white'

color settings

Definition at line 24 of file networkxpython.py.

tuple titletxt = plt.text(0.02,0.98,'',transform=mainax.transAxes, size=16, weight='bold',color=titlecolor, ha='left', va='top',zorder=50)

Definition at line 86 of file networkxpython.py.

Send comments to:
COOLFluiD Web Admin