Some of the previous answers mention producing mathematical illustrations.
SVG may be of interest as a language in which to express mathematical illustrations, especially from the point-of-view of having an open standard http://www.w3.org/TR/SVG/, and in being scalable (whereas bitmaps are not).
SVG support includes cubic Bézier curves http://www.w3.org/TR/2003/REC-SVG11-20030114/paths.html#PathDataCubicBezierCommands, useful for function sketches.
The SVG files might be generated from a script written in one of the languages mentioned in other answers here, and are relatively easy to parse (e.g. for transformation purposes) as input using XML libraries.
SVG files might be dropped directly into web pages for on-line documentation, but that relies upon browser support, or the supply of pre-rasterised alternatives.
There are tools for converting both from raster (bitmap) formats to SVG, such as Delineate http://delineate.sourceforge.net/, and from SVG to bitmap, such as the Apache Batik rasteriser http://xmlgraphics.apache.org/batik/tools/rasterizer.html.
[I do not know how widely SVG is used by mathematicians, but as a mathematician and programmer, I am attracted to certain properties of SVG itself, and to the availability of tools.]