1
########################################################################
3
# Vision Network - Python source code - file generated by vision
4
# Friday 13 April 2007 12:34:25
6
# The Scripps Research Institute (TSRI)
7
# Molecular Graphics Lab
8
# La Jolla, CA 92037, USA
10
# Copyright: Daniel Stoffler, Michel Sanner and TSRI
12
# revision: Guillaume Vareille
14
#########################################################################
16
# $Header: /opt/cvs/python/packages/share1.5/Vision/doc/Examples/matplotlib/BarH_net.py,v 1.3 2007/08/29 20:37:16 vareille Exp $
18
# $Id: BarH_net.py,v 1.3 2007/08/29 20:37:16 vareille Exp $
21
from traceback import print_exc
22
## loading libraries ##
23
from Vision.matplotlibNodes import matplotliblib
24
masterNet.getEditor().addLibraryInstance(matplotliblib,"Vision.matplotlibNodes", "matplotliblib")
26
from Vision.StandardNodes import stdlib
27
masterNet.getEditor().addLibraryInstance(stdlib,"Vision.StandardNodes", "stdlib")
30
## saving node ReadTable ##
31
from Vision.StandardNodes import ReadTable
32
ReadTable_0 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib)
33
masterNet.addNode(ReadTable_0,138,9)
34
ReadTable_0.inputPortByName['filename'].widget.set("Data/barh_plot_data.dat", run=False)
35
ReadTable_0.inputPortByName['sep'].widget.set(",", run=False)
36
ReadTable_0.inputPortByName['datatype'].widget.set("float", run=False)
37
apply(ReadTable_0.configure, (), {'expanded': True})
39
print "WARNING: failed to restore ReadTable named ReadTable in network masterNet"
44
## saving node BarH ##
45
from Vision.matplotlibNodes import BarHNE
46
BarH_1 = BarHNE(constrkw = {}, name='BarH', library=matplotliblib)
47
masterNet.addNode(BarH_1,133,326)
49
print "WARNING: failed to restore BarHNE named BarH in network masterNet"
54
## saving node Index ##
55
from Vision.StandardNodes import Index
56
Index_2 = Index(constrkw = {}, name='Index', library=stdlib)
57
masterNet.addNode(Index_2,14,178)
58
apply(Index_2.configure, (), {'expanded': True})
60
print "WARNING: failed to restore Index named Index in network masterNet"
65
## saving node Index ##
66
from Vision.StandardNodes import Index
67
Index_3 = Index(constrkw = {}, name='Index', library=stdlib)
68
masterNet.addNode(Index_3,156,177)
69
apply(Index_3.inputPortByName['index'].widget.configure, (), {'max': 2})
70
Index_3.inputPortByName['index'].widget.set(1, run=False)
71
apply(Index_3.configure, (), {'expanded': True})
73
print "WARNING: failed to restore Index named Index in network masterNet"
78
## saving node Index ##
79
from Vision.StandardNodes import Index
80
Index_4 = Index(constrkw = {}, name='Index', library=stdlib)
81
masterNet.addNode(Index_4,300,178)
82
apply(Index_4.inputPortByName['index'].widget.configure, (), {'max': 2})
83
Index_4.inputPortByName['index'].widget.set(2, run=False)
84
apply(Index_4.configure, (), {'expanded': True})
86
print "WARNING: failed to restore Index named Index in network masterNet"
92
## saving connections for network BarH ##
93
if ReadTable_0 is not None and Index_2 is not None:
95
masterNet.connectNodes(
96
ReadTable_0, Index_2, "data", "data", blocking=True)
98
print "WARNING: failed to restore connection between ReadTable_0 and Index_2 in network masterNet"
99
if ReadTable_0 is not None and Index_3 is not None:
101
masterNet.connectNodes(
102
ReadTable_0, Index_3, "data", "data", blocking=True)
104
print "WARNING: failed to restore connection between ReadTable_0 and Index_3 in network masterNet"
105
if ReadTable_0 is not None and Index_4 is not None:
107
masterNet.connectNodes(
108
ReadTable_0, Index_4, "data", "data", blocking=True)
110
print "WARNING: failed to restore connection between ReadTable_0 and Index_4 in network masterNet"
111
if Index_2 is not None and BarH_1 is not None:
113
masterNet.connectNodes(
114
Index_2, BarH_1, "data", "bottom", blocking=True)
116
print "WARNING: failed to restore connection between Index_2 and BarH_1 in network masterNet"
117
if Index_3 is not None and BarH_1 is not None:
119
masterNet.connectNodes(
120
Index_3, BarH_1, "data", "width", blocking=True)
122
print "WARNING: failed to restore connection between Index_3 and BarH_1 in network masterNet"
123
if Index_4 is not None and BarH_1 is not None:
125
masterNet.connectNodes(
126
Index_4, BarH_1, "data", "xerr", blocking=True)
128
print "WARNING: failed to restore connection between Index_4 and BarH_1 in network masterNet"