On Tue, Sep 26, 2006 at 12:25:08AM +0200, Dr Eberhard Lisse wrote: > I would like to display the transaction date and the amount from > payments to an income account > > SELECT gl.id, gl.reference, ac.transdate, > round(ac.amount::numeric,2) AS amount, gl.notes > FROM gl, acc_trans ac, chart > WHERE chart.accno = 4321 > AND (ac.trans_id = gl.id) > AND (ac.chart_id = chart.id) > AND (ac.source not ilike '%yearend%') > ORDER BY ac.transdate, gl.id; > > graphically (one pix for each funder (accno)), averaged over each month > of the year, with the X-Axis showing the 12 months and the colors of the > bars indicating each year (ie 4 bars next to each other for each month), > amounts to go on the left Y-Axis. > > Then I want in the same picture for each year cumulative amounts per > month in a line graph, with the amounts going to the right Y-Axis. > > I have R, grace, gnuplot, OpenOffice and the usual tools on a Mac and > can download whatever fink has to offer. > > Anyone any idea? No spooned vaporware, please. >
I have always found gnuplot to be flexible and to produce output that Edward Tufte would be proud of. The downside is I that use it so infrequently that it takes me 30 minutes of reading to get going. You could have psql output to a file, then massaging file into gnuplot input format, then run a gnuplot script that reads that file as input. It's bulky, but can be automated once done. Since gnuplot can produce Postscript output, I bet you could even embed your graph in a tex template. That would be pretty slick. m ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ sql-ledger-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sql-ledger-users
