Start from gnuplot.info . I am not sure whether it can be used as a library (probably it can), but it can definitely be fed through stdin/pipe.
I has a prebuilt Windows binary and, of course, can be built on UNIX boxes - I build it routienly - the main reason is because it is used GNU 'octave', which I also build.
There are other powerful suites - QtiPlot, for example:
http://soft.proindependent.com/qtiplot.html .