Here I'm introducing an interesting PHP program.
You can pass an expression, f(x) and a range for your x variable and it draws the functions diagram for you. The generated diagram can be saved an a normal image.
Here you can see a sample diagram for f(x) = sin(x/10)
Try it yourself here. The code also can be downloaded from phpcclasses.org .