]> SALOME platform Git repositories - tools/medcoupling.git/blob - src/MEDOP/tut/medcoupling/pyfunctions/plotter.py
Salome HOME
Add documentation for users and basic tutotial script examples (associated to the...
[tools/medcoupling.git] / src / MEDOP / tut / medcoupling / pyfunctions / plotter.py
1 #!/usr/bin/env python
2
3 import pylab
4 import numpy
5 def plot(function, start=0., stop=1., step=0.01):
6     """
7     The parameter function must be a callable.
8     """
9     arrX=numpy.arange(start, stop, step, dtype='float64')
10     # function is a callable
11     arrY=map(function,arrX)
12     pylab.plot(arrX, arrY)
13     pylab.show()