Changes

Jump to navigation Jump to search
479 bytes added ,  23:53, 6 April 2010
Line 58: Line 58:  
get_equation_string should return the string needed to apply the same function in the Python parse equation input. (NOTE: this may mean you'll need to add the function to the list of those available to the plotter.parse module.)
 
get_equation_string should return the string needed to apply the same function in the Python parse equation input. (NOTE: this may mean you'll need to add the function to the list of those available to the plotter.parse module.)
   −
4. Add to node list.
+
==== Add node appropriate category ====
 +
 
 +
Edit the file: plotter/view/puzzletree/nodes/__init__.py.
 +
 
 +
Add the node class you just created to the appropriate category (in this case: functions).
 +
 
 +
<pre>
 +
...
 +
 
 +
# functions
 +
from .constant import Constant
 +
from .identity import Identity
 +
from .functionname import FunctionName
 +
 
 +
FUNCTIONS = [
 +
    Constant,
 +
    Identity,
 +
    FunctionName
 +
]
 +
 
 +
...
 +
</pre>
 +
 
 +
That's it! Your new function should now show up in the palette when you edit equations in the Plot activity.
    
== Resources ==
 
== Resources ==
12

edits

Navigation menu