look for JFreeChart, which is an open source chart-API. quite powerfull! has the ability to create an java.awt.Image so you can so with it what you want. also they have the XYPlot which is usable for mathematical graphs.