########################################################################
#
#    Vision Network - Python source code - file generated by vision
#    Friday 13 April 2007 13:45:16 
#    
#       The Scripps Research Institute (TSRI)
#       Molecular Graphics Lab
#       La Jolla, CA 92037, USA
#
# Copyright: Daniel Stoffler, Michel Sanner and TSRI
#   
# revision: Guillaume Vareille
#  
#########################################################################
#
# $Header: /opt/cvs/python/packages/share1.5/Vision/doc/Examples/matplotlib/Semilogx_net.py,v 1.3 2007/08/29 20:37:16 vareille Exp $
#
# $Id: Semilogx_net.py,v 1.3 2007/08/29 20:37:16 vareille 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_130 = ReadTable(constrkw = {}, name='ReadTable', library=stdlib)
    masterNet.addNode(ReadTable_130,123,12)
    ReadTable_130.inputPortByName['filename'].widget.set("Data/semilogx_data.dat", run=False)
    ReadTable_130.inputPortByName['sep'].widget.set(",", run=False)
    ReadTable_130.inputPortByName['datatype'].widget.set("float", run=False)
    apply(ReadTable_130.configure, (), {'expanded': True})
except:
    print "WARNING: failed to restore ReadTable named ReadTable in network masterNet"
    print_exc()
    ReadTable_130=None

try:
    ## saving node Set Matplotlib options ##
    from Vision.matplotlibNodes import MatPlotLibOptions
    Set_Matplotlib_options_131 = MatPlotLibOptions(constrkw = {}, name='Set Matplotlib options', library=matplotliblib)
    masterNet.addNode(Set_Matplotlib_options_131,325,286)
    Set_Matplotlib_options_131.inputPortByName['matplotlibOptions'].widget.set({'gridcolor': 'black', 'gridOn': 1, 'whichgrid': 'minor', 'gridlinewidth': 0.24999999999999989}, run=False)
except:
    print "WARNING: failed to restore MatPlotLibOptions named Set Matplotlib options in network masterNet"
    print_exc()
    Set_Matplotlib_options_131=None

try:
    ## saving node Semilogx ##
    from Vision.matplotlibNodes import SemilogxNE
    Semilogx_132 = SemilogxNE(constrkw = {}, name='Semilogx', library=matplotliblib)
    masterNet.addNode(Semilogx_132,126,343)
except:
    print "WARNING: failed to restore SemilogxNE named Semilogx in network masterNet"
    print_exc()
    Semilogx_132=None

try:
    ## saving node Index ##
    from Vision.StandardNodes import Index
    Index_133 = Index(constrkw = {}, name='Index', library=stdlib)
    masterNet.addNode(Index_133,13,183)
    apply(Index_133.configure, (), {'expanded': True})
except:
    print "WARNING: failed to restore Index named Index in network masterNet"
    print_exc()
    Index_133=None

try:
    ## saving node Index ##
    from Vision.StandardNodes import Index
    Index_134 = Index(constrkw = {}, name='Index', library=stdlib)
    masterNet.addNode(Index_134,201,178)
    apply(Index_134.inputPortByName['index'].widget.configure, (), {'max': 1})
    Index_134.inputPortByName['index'].widget.set(1, run=False)
    apply(Index_134.configure, (), {'expanded': True})
except:
    print "WARNING: failed to restore Index named Index in network masterNet"
    print_exc()
    Index_134=None

masterNet.freeze()

## saving connections for network Semilogx ##
if Set_Matplotlib_options_131 is not None and Semilogx_132 is not None:
    try:
        masterNet.connectNodes(
            Set_Matplotlib_options_131, Semilogx_132, "matplotlibOptions", "drawAreaDef", blocking=True)
    except:
        print "WARNING: failed to restore connection between Set_Matplotlib_options_131 and Semilogx_132 in network masterNet"
if ReadTable_130 is not None and Index_133 is not None:
    try:
        masterNet.connectNodes(
            ReadTable_130, Index_133, "data", "data", blocking=True)
    except:
        print "WARNING: failed to restore connection between ReadTable_130 and Index_133 in network masterNet"
if ReadTable_130 is not None and Index_134 is not None:
    try:
        masterNet.connectNodes(
            ReadTable_130, Index_134, "data", "data", blocking=True)
    except:
        print "WARNING: failed to restore connection between ReadTable_130 and Index_134 in network masterNet"
if Index_134 is not None and Semilogx_132 is not None:
    try:
        masterNet.connectNodes(
            Index_134, Semilogx_132, "data", "y", blocking=True)
    except:
        print "WARNING: failed to restore connection between Index_134 and Semilogx_132 in network masterNet"
if Index_133 is not None and Semilogx_132 is not None:
    try:
        masterNet.connectNodes(
            Index_133, Semilogx_132, "data", "x", blocking=True)
    except:
        print "WARNING: failed to restore connection between Index_133 and Semilogx_132 in network masterNet"
masterNet.unfreeze()
#masterNet.run()

