######################################################################## # # Vision Network - Python source code - file generated by vision # Friday 13 April 2007 13:25:49 # # The Scripps Research Institute (TSRI) # Molecular Graphics Lab # La Jolla, CA 92037, USA # # Copyright: Daniel Stoffler, Michel Sanner and TSRI # # revision: Guillaume Vareille # ######################################################################### # # $Header: /export/cvs/python/packages/share1.5/Vision/Examples/matplotlib/MultiPlot_net.py,v 1.3 2007/04/16 19:05:51 sowjanya Exp $ # # $Id: MultiPlot_net.py,v 1.3 2007/04/16 19:05:51 sowjanya Exp $ # from traceback import print_exc ## loading libraries ## from Vision.matplotlibNodes import matplotliblib masterNet.getEditor().addLibraryInstance(matplotliblib,"Vision.matplotlibNodes", "matplotliblib") from Vision.StandardNodes import stdlib masterNet.getEditor().addLibraryInstance(stdlib,"Vision.StandardNodes", "stdlib") try: ## saving node Histogram ## from Vision.matplotlibNodes import HistogramNE Histogram_74 = HistogramNE(constrkw = {}, name='Histogram', library=matplotliblib) masterNet.addNode(Histogram_74,536,326) Histogram_74.inputPortByName['bins'].widget.set(50, run=False) Histogram_74.inputPortByName['patch_facecolor'].widget.set("green", run=False) apply(Histogram_74.configure, (), {'expanded': True}) except: print "WARNING: failed to restore HistogramNE named Histogram in network masterNet" print_exc() Histogram_74=None try: ## saving node ReadTable ## from Vision.StandardNodes import ReadTable ReadTable_75 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib) masterNet.addNode(ReadTable_75,289,24) ReadTable_75.inputPortByName['filename'].widget.set("Data/plot_data.dat", run=False) ReadTable_75.inputPortByName['sep'].widget.set(",", run=False) ReadTable_75.inputPortByName['datatype'].widget.set("float", run=False) apply(ReadTable_75.configure, (), {'expanded': True}) except: print "WARNING: failed to restore ReadTable named ReadTable in network masterNet" print_exc() ReadTable_75=None try: ## saving node Plot ## from Vision.matplotlibNodes import PlotNE Plot_76 = PlotNE(constrkw = {}, name='Plot', library=matplotliblib) masterNet.addNode(Plot_76,289,316) Plot_76.inputPortByName['color'].widget.set("blue", run=False) apply(Plot_76.configure, (), {'expanded': True}) except: print "WARNING: failed to restore PlotNE named Plot in network masterNet" print_exc() Plot_76=None try: ## saving node Scatter ## from Vision.matplotlibNodes import ScatterNE Scatter_77 = ScatterNE(constrkw = {}, name='Scatter', library=matplotliblib) masterNet.addNode(Scatter_77,31,309) Scatter_77.inputPortByName['s'].widget.set(145.11, run=False) Scatter_77.inputPortByName['c'].widget.set("m", run=False) Scatter_77.inputPortByName['marker'].widget.set("octagon", run=False) apply(Scatter_77.configure, (), {'expanded': True}) except: print "WARNING: failed to restore ScatterNE named Scatter in network masterNet" print_exc() Scatter_77=None try: ## saving node ReadTable ## from Vision.StandardNodes import ReadTable ReadTable_78 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib) masterNet.addNode(ReadTable_78,42,20) ReadTable_78.inputPortByName['filename'].widget.set("Data/scatter_data.dat", run=False) ReadTable_78.inputPortByName['sep'].widget.set(",", run=False) ReadTable_78.inputPortByName['datatype'].widget.set("float", run=False) apply(ReadTable_78.configure, (), {'expanded': True}) except: print "WARNING: failed to restore ReadTable named ReadTable in network masterNet" print_exc() ReadTable_78=None try: ## saving node MultiPlot ## from Vision.matplotlibNodes import MultiPlotNE MultiPlot_79 = MultiPlotNE(constrkw = {}, name='MultiPlot', library=matplotliblib) masterNet.addNode(MultiPlot_79,289,495) except: print "WARNING: failed to restore MultiPlotNE named MultiPlot in network masterNet" print_exc() MultiPlot_79=None try: ## saving node ReadTable ## from Vision.StandardNodes import ReadTable ReadTable_80 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib) masterNet.addNode(ReadTable_80,525,19) ReadTable_80.inputPortByName['filename'].widget.set("Data/histogram_data.dat", run=False) ReadTable_80.inputPortByName['sep'].widget.set(",", run=False) ReadTable_80.inputPortByName['datatype'].widget.set("float", run=False) apply(ReadTable_80.configure, (), {'expanded': True}) except: print "WARNING: failed to restore ReadTable named ReadTable in network masterNet" print_exc() ReadTable_80=None try: ## saving node Index ## from Vision.StandardNodes import Index Index_81 = Index(constrkw = {}, name='Index', library=stdlib) masterNet.addNode(Index_81,34,185) apply(Index_81.configure, (), {'expanded': True}) except: print "WARNING: failed to restore Index named Index in network masterNet" print_exc() Index_81=None try: ## saving node Index ## from Vision.StandardNodes import Index Index_82 = Index(constrkw = {}, name='Index', library=stdlib) masterNet.addNode(Index_82,217,187) apply(Index_82.inputPortByName['index'].widget.configure, (), {'max': 1}) Index_82.inputPortByName['index'].widget.set(1, run=False) apply(Index_82.configure, (), {'expanded': True}) except: print "WARNING: failed to restore Index named Index in network masterNet" print_exc() Index_82=None try: ## saving node Index ## from Vision.StandardNodes import Index Index_83 = Index(constrkw = {}, name='Index', library=stdlib) masterNet.addNode(Index_83,391,192) apply(Index_83.configure, (), {'expanded': True}) except: print "WARNING: failed to restore Index named Index in network masterNet" print_exc() Index_83=None try: ## saving node Index ## from Vision.StandardNodes import Index Index_84 = Index(constrkw = {}, name='Index', library=stdlib) masterNet.addNode(Index_84,570,197) apply(Index_84.inputPortByName['index'].widget.configure, (), {'max': 1}) Index_84.inputPortByName['index'].widget.set(1, run=False) apply(Index_84.configure, (), {'expanded': True}) except: print "WARNING: failed to restore Index named Index in network masterNet" print_exc() Index_84=None masterNet.freeze() ## saving connections for network MultiPlot ## if ReadTable_78 is not None and Index_81 is not None: try: masterNet.connectNodes( ReadTable_78, Index_81, "data", "data", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_78 and Index_81 in network masterNet" if ReadTable_78 is not None and Index_82 is not None: try: masterNet.connectNodes( ReadTable_78, Index_82, "data", "data", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_78 and Index_82 in network masterNet" if Index_81 is not None and Scatter_77 is not None: try: masterNet.connectNodes( Index_81, Scatter_77, "data", "x", blocking=True) except: print "WARNING: failed to restore connection between Index_81 and Scatter_77 in network masterNet" if Index_82 is not None and Scatter_77 is not None: try: masterNet.connectNodes( Index_82, Scatter_77, "data", "y", blocking=True) except: print "WARNING: failed to restore connection between Index_82 and Scatter_77 in network masterNet" if Scatter_77 is not None and MultiPlot_79 is not None: try: masterNet.connectNodes( Scatter_77, MultiPlot_79, "plot", "multiplot", blocking=True) except: print "WARNING: failed to restore connection between Scatter_77 and MultiPlot_79 in network masterNet" if Plot_76 is not None and MultiPlot_79 is not None: try: masterNet.connectNodes( Plot_76, MultiPlot_79, "plot", "multiplot", blocking=True) except: print "WARNING: failed to restore connection between Plot_76 and MultiPlot_79 in network masterNet" if Histogram_74 is not None and MultiPlot_79 is not None: try: masterNet.connectNodes( Histogram_74, MultiPlot_79, "plot", "multiplot", blocking=True) except: print "WARNING: failed to restore connection between Histogram_74 and MultiPlot_79 in network masterNet" if Index_83 is not None and Plot_76 is not None: try: masterNet.connectNodes( Index_83, Plot_76, "data", "y", blocking=True) except: print "WARNING: failed to restore connection between Index_83 and Plot_76 in network masterNet" if ReadTable_75 is not None and Index_83 is not None: try: masterNet.connectNodes( ReadTable_75, Index_83, "data", "data", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_75 and Index_83 in network masterNet" if ReadTable_75 is not None and Index_84 is not None: try: masterNet.connectNodes( ReadTable_75, Index_84, "data", "data", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_75 and Index_84 in network masterNet" if Index_84 is not None and Plot_76 is not None: try: masterNet.connectNodes( Index_84, Plot_76, "data", "x", blocking=True) except: print "WARNING: failed to restore connection between Index_84 and Plot_76 in network masterNet" if ReadTable_80 is not None and Histogram_74 is not None: try: masterNet.connectNodes( ReadTable_80, Histogram_74, "data", "values", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_80 and Histogram_74 in network masterNet" masterNet.unfreeze() #masterNet.run()