Gnuplot plots 2d and 3d graphs, from a data file or with a formula. It has an interactive mode with online help, or it can be used non-interactively. Gnuplot does function fitting to data sets, and it does output to many terminals, among which are postscript, X11 display, PNG and GIF (via the old gd library).