1
########################################################################
3
# Vision Network - Python source code - file generated by vision
4
# Monday 16 April 2007 14:08:32
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/ScatterClassic_net.py,v 1.3 2007/08/29 20:37:16 vareille Exp $
18
# $Id: ScatterClassic_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_12 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib)
33
masterNet.addNode(ReadTable_12,108,57)
34
ReadTable_12.inputPortByName['filename'].widget.set("Data/scatter_data.dat", run=False)
35
ReadTable_12.inputPortByName['sep'].widget.set(",", run=False)
36
ReadTable_12.inputPortByName['datatype'].widget.set("float", run=False)
37
apply(ReadTable_12.configure, (), {'expanded': True})
39
print "WARNING: failed to restore ReadTable named ReadTable in network masterNet"
44
## saving node ScatterClassic ##
45
from Vision.matplotlibNodes import ScatterClassicNE
46
ScatterClassic_13 = ScatterClassicNE(constrkw = {}, name='ScatterClassic', library=matplotliblib)
47
masterNet.addNode(ScatterClassic_13,118,363)
48
ScatterClassic_13.inputPortByName['s'].widget.set(0.0377777777778, run=False)
49
ScatterClassic_13.inputPortByName['c'].widget.set("g", run=False)
50
apply(ScatterClassic_13.configure, (), {'expanded': True})
52
print "WARNING: failed to restore ScatterClassicNE named ScatterClassic in network masterNet"
54
ScatterClassic_13=None
57
## saving node Index ##
58
from Vision.StandardNodes import Index
59
Index_14 = Index(constrkw = {}, name='Index', library=stdlib)
60
masterNet.addNode(Index_14,28,221)
61
apply(Index_14.configure, (), {'expanded': True})
63
print "WARNING: failed to restore Index named Index in network masterNet"
68
## saving node Index ##
69
from Vision.StandardNodes import Index
70
Index_15 = Index(constrkw = {}, name='Index', library=stdlib)
71
masterNet.addNode(Index_15,257,217)
72
apply(Index_15.inputPortByName['index'].widget.configure, (), {'max': 1})
73
Index_15.inputPortByName['index'].widget.set(1, run=False)
74
apply(Index_15.configure, (), {'expanded': True})
76
print "WARNING: failed to restore Index named Index in network masterNet"
82
## saving connections for network ScatterClassic ##
83
if ReadTable_12 is not None and Index_14 is not None:
85
masterNet.connectNodes(
86
ReadTable_12, Index_14, "data", "data", blocking=True)
88
print "WARNING: failed to restore connection between ReadTable_12 and Index_14 in network masterNet"
89
if ReadTable_12 is not None and Index_15 is not None:
91
masterNet.connectNodes(
92
ReadTable_12, Index_15, "data", "data", blocking=True)
94
print "WARNING: failed to restore connection between ReadTable_12 and Index_15 in network masterNet"
95
if Index_14 is not None and ScatterClassic_13 is not None:
97
masterNet.connectNodes(
98
Index_14, ScatterClassic_13, "data", "x", blocking=True)
100
print "WARNING: failed to restore connection between Index_14 and ScatterClassic_13 in network masterNet"
101
if Index_15 is not None and ScatterClassic_13 is not None:
103
masterNet.connectNodes(
104
Index_15, ScatterClassic_13, "data", "y", blocking=True)
106
print "WARNING: failed to restore connection between Index_15 and ScatterClassic_13 in network masterNet"