Changeset 555 for trunk/examples/graph


Ignore:
Timestamp:
Dec 9, 2006 1:33:35 AM (14 years ago)
Author:
dkearney
Message:

updated examples removing output sections from tool.xml files and making the example code generate the output section using the rappture library put command. this change is made in the example files to help curb people from defining output sections in their tool.xml files. the output sections should really be created inside the program when the output data is ready to be entered.

Location:
trunk/examples/graph
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/graph/graph.py

    r115 r555  
    2626npts = 100
    2727
     28io.put('output.curve(result).about.label','Formula: Y vs X',append=0)
     29
    2830for i in range(npts):
    2931    x = (xmax-xmin)/npts * i + xmin;
    3032    y = eval(formula)
    31     io.put('output.curve.component.xy', '%g %g\n' % (x,y), append=1)
     33    io.put('output.curve(result).component.xy', '%g %g\n' % (x,y), append=1)
    3234
    3335Rappture.result(io)
  • trunk/examples/graph/tool.xml

    r62 r555  
    2323        </number>
    2424    </input>
    25     <output>
    26         <curve id="result">
    27             <about> <label>Formula: Y vs X</label> </about>
    28         </curve>
    29     </output>
    3025</run>
Note: See TracChangeset for help on using the changeset viewer.