1
########################################################################
3
# Vision Network - Python source code - file generated by vision
4
# Tuesday 17 April 2007 10:25:23
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/SetmatplotlibOptions_net.py,v 1.2 2007/08/29 20:37:16 vareille Exp $
18
# $Id: SetmatplotlibOptions_net.py,v 1.2 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")
27
## saving node Set Matplotlib options ##
28
from Vision.matplotlibNodes import MatPlotLibOptions
29
Set_Matplotlib_options_20 = MatPlotLibOptions(constrkw = {}, name='Set Matplotlib options', library=matplotliblib)
30
masterNet.addNode(Set_Matplotlib_options_20,202,77)
31
Set_Matplotlib_options_20.inputPortByName['matplotlibOptions'].widget.set({'edgecolor': 'indigo', 'ytick.color': 'darkgreen', 'figpatch_facecolor': 'lightsalmon', 'facecolor': 'gold', 'figpatch_linewidth': 1.0, 'markeredgewidth': 6.8888888888888777, 'xtick.color': 'darkgreen', 'gridlinewidth': 4.6944444444444366, 'gridlinestyle': '--', 'figpatch_edgecolor': 'white', 'gridcolor': 'firebrick', 'gridOn': 1, 'ytick.labelsize': 19.250000000000046, 'xtick.labelsize': 17.388888888888907, 'linewidth': 5.4444444444444393, 'anchor': 'C'}, run=False)
33
print "WARNING: failed to restore MatPlotLibOptions named Set Matplotlib options in network masterNet"
35
Set_Matplotlib_options_20=None
38
## saving node SinFunc ##
39
from Vision.matplotlibNodes import SinFunc
40
SinFunc_21 = SinFunc(constrkw = {}, name='SinFunc', library=matplotliblib)
41
masterNet.addNode(SinFunc_21,35,11)
42
apply(SinFunc_21.configure, (), {'expanded': True})
44
print "WARNING: failed to restore SinFunc named SinFunc in network masterNet"
49
## saving node Plot ##
50
from Vision.matplotlibNodes import PlotNE
51
Plot_22 = PlotNE(constrkw = {}, name='Plot', library=matplotliblib)
52
masterNet.addNode(Plot_22,41,158)
53
apply(Plot_22.configure, (), {'expanded': True})
55
print "WARNING: failed to restore PlotNE named Plot in network masterNet"
61
## saving connections for network new ##
62
if SinFunc_21 is not None and Plot_22 is not None:
64
masterNet.connectNodes(
65
SinFunc_21, Plot_22, "y", "y", blocking=True)
67
print "WARNING: failed to restore connection between SinFunc_21 and Plot_22 in network masterNet"
68
if Set_Matplotlib_options_20 is not None and Plot_22 is not None:
70
masterNet.connectNodes(
71
Set_Matplotlib_options_20, Plot_22, "matplotlibOptions", "drawAreaDef", blocking=True)
73
print "WARNING: failed to restore connection between Set_Matplotlib_options_20 and Plot_22 in network masterNet"