In LaTeX I've been using mfpic because it seems an easy way to create PDF compatible files and had commands like \function{-8}{8}{.1}{x**2} which would draw x^2 on a coordinate plane from x=-8 to x=8 graphing a new point every .1.
this is very easy to handle with pst-plot
http://www.pstricks.de/pst-plot/examples.phtml
Herbert
