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).