Ejemplo n.º 1
0
T.link_to_evol_model(T.workdir + '/fb/out','fb')
T.link_to_evol_model(T.workdir + '/M1/out','M1')
T.link_to_evol_model(T.workdir + '/M2/out','M2')

T.get_evol_model('M2').set_histface(kind='curve',
                                      colors=col, up = False,
                                      hlines=[1.0,0.3],
                                      hlines_col=['black','grey'])
T.show(histfaces = ['M1', 'M2'])


###
# mark tree functionality
print T.write(format=10)
name = None
while name not in T.get_leaf_names():
    name = raw_input('         ====> As you need to mark some branches to run branch\n\
    models, type the name of one leaf: ')

idname = T.get_leaves_by_name(name)[0].node_id

print '         ----> you want to mark:',name,'that has this idname: ', idname
T.mark_tree([idname]) # by default will mark with '#1'
print 'have a look to the mark: '
print re.sub('#','|',re.sub('[0-9a-zA-Z_(),;]',' ',T.write(format=10)))
print re.sub('#','v',re.sub('[0-9a-zA-Z_(),;]',' ',T.write(format=10)))
print T.write(format=10)
print '\n You have marked the tree with a command like:  T.mark_tree([%d])\n' % (idname)
print '\n%s\n%s\n%s\n' % ('*'*10 + ' doc ' + '*'*10, T.mark_tree.func_doc, \
                                                                      '*'*30)