1
########################################################################
3
# Vision Network - Python source code - file generated by vision
4
# Wednesday 18 April 2007 08:43:15
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/DrawArea_net.py,v 1.3 2007/08/29 20:37:16 vareille Exp $
18
# $Id: DrawArea_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 Plot ##
31
from Vision.matplotlibNodes import PlotNE
32
Plot_6 = PlotNE(constrkw = {}, name='Plot', library=matplotliblib)
33
masterNet.addNode(Plot_6,160,342)
34
Plot_6.inputPortByName['color'].widget.set("magenta", run=False)
35
Plot_6.inputPortByName['line_linewidth'].widget.set(3.60555555556, run=False)
36
apply(Plot_6.configure, (), {'expanded': True})
38
print "WARNING: failed to restore PlotNE named Plot in network masterNet"
43
## saving node Draw Area ##
44
from Vision.matplotlibNodes import MPLDrawAreaNE
45
Draw_Area_7 = MPLDrawAreaNE(constrkw = {}, name='Draw Area', library=matplotliblib)
46
masterNet.addNode(Draw_Area_7,312,210)
47
Draw_Area_7.inputPortByName['left'].widget.set(0.158333333333, run=False)
48
Draw_Area_7.inputPortByName['bottom'].widget.set(0.172222222222, run=False)
49
Draw_Area_7.inputPortByName['width'].widget.set(0.663888888889, run=False)
50
Draw_Area_7.inputPortByName['height'].widget.set(0.652777777778, run=False)
51
Draw_Area_7.inputPortByName['title'].widget.set("About as simple as it gets , folks", run=False)
52
Draw_Area_7.inputPortByName['xlabel'].widget.set("time(s)", run=False)
53
Draw_Area_7.inputPortByName['ylabel'].widget.set("voltage(mV)", run=False)
54
Draw_Area_7.inputPortByName['ylimit'].widget.set("[0,1.0]", run=False)
55
Draw_Area_7.inputPortByName['xticklabels'].widget.set(0, run=False)
56
Draw_Area_7.inputPortByName['autoscaleon'].widget.set(0, run=False)
58
print "WARNING: failed to restore MPLDrawAreaNE named Draw Area in network masterNet"
63
## saving node Index ##
64
from Vision.StandardNodes import Index
65
Index_8 = Index(constrkw = {}, name='Index', library=stdlib)
66
masterNet.addNode(Index_8,5,183)
67
apply(Index_8.configure, (), {'expanded': True})
69
print "WARNING: failed to restore Index named Index in network masterNet"
74
## saving node Index ##
75
from Vision.StandardNodes import Index
76
Index_9 = Index(constrkw = {}, name='Index', library=stdlib)
77
masterNet.addNode(Index_9,150,182)
78
apply(Index_9.inputPortByName['index'].widget.configure, (), {'max': 1})
79
Index_9.inputPortByName['index'].widget.set(1, run=False)
80
apply(Index_9.configure, (), {'expanded': True})
82
print "WARNING: failed to restore Index named Index in network masterNet"
87
## saving node ReadTable ##
88
from Vision.StandardNodes import ReadTable
89
ReadTable_10 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib)
90
masterNet.addNode(ReadTable_10,142,33)
91
ReadTable_10.inputPortByName['filename'].widget.set("Data/plot_data.dat", run=False)
92
ReadTable_10.inputPortByName['sep'].widget.set(",", run=False)
93
ReadTable_10.inputPortByName['datatype'].widget.set("float", run=False)
94
apply(ReadTable_10.configure, (), {'expanded': True})
96
print "WARNING: failed to restore ReadTable named ReadTable in network masterNet"
102
## saving connections for network DrawArea ##
103
if Draw_Area_7 is not None and Plot_6 is not None:
105
masterNet.connectNodes(
106
Draw_Area_7, Plot_6, "drawAreaDef", "drawAreaDef", blocking=True)
108
print "WARNING: failed to restore connection between Draw_Area_7 and Plot_6 in network masterNet"
109
if Index_8 is not None and Plot_6 is not None:
111
masterNet.connectNodes(
112
Index_8, Plot_6, "data", "y", blocking=True)
114
print "WARNING: failed to restore connection between Index_8 and Plot_6 in network masterNet"
115
if Index_9 is not None and Plot_6 is not None:
117
masterNet.connectNodes(
118
Index_9, Plot_6, "data", "x", blocking=True)
120
print "WARNING: failed to restore connection between Index_9 and Plot_6 in network masterNet"
121
if ReadTable_10 is not None and Index_8 is not None:
123
masterNet.connectNodes(
124
ReadTable_10, Index_8, "data", "data", blocking=True)
126
print "WARNING: failed to restore connection between ReadTable_10 and Index_8 in network masterNet"
127
if ReadTable_10 is not None and Index_9 is not None:
129
masterNet.connectNodes(
130
ReadTable_10, Index_9, "data", "data", blocking=True)
132
print "WARNING: failed to restore connection between ReadTable_10 and Index_9 in network masterNet"