######################################################################## # # Vision Network - Python source code - file generated by vision # Friday 13 April 2007 12:46:55 # # 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/ErrorBar_net.py,v 1.3 2007/04/16 19:05:51 sowjanya Exp $ # # $Id: ErrorBar_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 ReadTable ## from Vision.StandardNodes import ReadTable ReadTable_38 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib) masterNet.addNode(ReadTable_38,154,22) ReadTable_38.inputPortByName['filename'].widget.set("Data/errorbar_data.dat", run=False) ReadTable_38.inputPortByName['sep'].widget.set(",", run=False) ReadTable_38.inputPortByName['datatype'].widget.set("float", run=False) apply(ReadTable_38.configure, (), {'expanded': True}) except: print "WARNING: failed to restore ReadTable named ReadTable in network masterNet" print_exc() ReadTable_38=None try: ## saving node ErrorBar ## from Vision.matplotlibNodes import ErrorBarNE ErrorBar_39 = ErrorBarNE(constrkw = {}, name='ErrorBar', library=matplotliblib) masterNet.addNode(ErrorBar_39,190,338) ErrorBar_39.inputPortByName['format'].widget.set("o", run=False) except: print "WARNING: failed to restore ErrorBarNE named ErrorBar in network masterNet" print_exc() ErrorBar_39=None try: ## saving node Index ## from Vision.StandardNodes import Index Index_40 = Index(constrkw = {}, name='Index', library=stdlib) masterNet.addNode(Index_40,4,199) apply(Index_40.configure, (), {'expanded': True}) except: print "WARNING: failed to restore Index named Index in network masterNet" print_exc() Index_40=None try: ## saving node Index ## from Vision.StandardNodes import Index Index_41 = Index(constrkw = {}, name='Index', library=stdlib) masterNet.addNode(Index_41,143,197) apply(Index_41.inputPortByName['index'].widget.configure, (), {'max': 3}) Index_41.inputPortByName['index'].widget.set(1, run=False) apply(Index_41.configure, (), {'expanded': True}) except: print "WARNING: failed to restore Index named Index in network masterNet" print_exc() Index_41=None try: ## saving node Index ## from Vision.StandardNodes import Index Index_42 = Index(constrkw = {}, name='Index', library=stdlib) masterNet.addNode(Index_42,280,199) apply(Index_42.inputPortByName['index'].widget.configure, (), {'max': 3}) Index_42.inputPortByName['index'].widget.set(2, run=False) apply(Index_42.configure, (), {'expanded': True}) except: print "WARNING: failed to restore Index named Index in network masterNet" print_exc() Index_42=None try: ## saving node Index ## from Vision.StandardNodes import Index Index_43 = Index(constrkw = {}, name='Index', library=stdlib) masterNet.addNode(Index_43,432,205) apply(Index_43.inputPortByName['index'].widget.configure, (), {'max': 3}) Index_43.inputPortByName['index'].widget.set(3, run=False) apply(Index_43.configure, (), {'expanded': True}) except: print "WARNING: failed to restore Index named Index in network masterNet" print_exc() Index_43=None masterNet.freeze() ## saving connections for network ErrorBar ## if ReadTable_38 is not None and Index_40 is not None: try: masterNet.connectNodes( ReadTable_38, Index_40, "data", "data", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_38 and Index_40 in network masterNet" if ReadTable_38 is not None and Index_41 is not None: try: masterNet.connectNodes( ReadTable_38, Index_41, "data", "data", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_38 and Index_41 in network masterNet" if ReadTable_38 is not None and Index_42 is not None: try: masterNet.connectNodes( ReadTable_38, Index_42, "data", "data", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_38 and Index_42 in network masterNet" if ReadTable_38 is not None and Index_43 is not None: try: masterNet.connectNodes( ReadTable_38, Index_43, "data", "data", blocking=True) except: print "WARNING: failed to restore connection between ReadTable_38 and Index_43 in network masterNet" if Index_40 is not None and ErrorBar_39 is not None: try: masterNet.connectNodes( Index_40, ErrorBar_39, "data", "x", blocking=True) except: print "WARNING: failed to restore connection between Index_40 and ErrorBar_39 in network masterNet" if Index_41 is not None and ErrorBar_39 is not None: try: masterNet.connectNodes( Index_41, ErrorBar_39, "data", "y", blocking=True) except: print "WARNING: failed to restore connection between Index_41 and ErrorBar_39 in network masterNet" if Index_42 is not None and ErrorBar_39 is not None: try: masterNet.connectNodes( Index_42, ErrorBar_39, "data", "xerr", blocking=True) except: print "WARNING: failed to restore connection between Index_42 and ErrorBar_39 in network masterNet" if Index_43 is not None and ErrorBar_39 is not None: try: masterNet.connectNodes( Index_43, ErrorBar_39, "data", "yerr", blocking=True) except: print "WARNING: failed to restore connection between Index_43 and ErrorBar_39 in network masterNet" masterNet.unfreeze() #masterNet.run()