From: Wesley M. <mo...@ch...> - 2004-05-17 23:58:28
|
On Mon, 17 May 2004, Ethan Merritt wrote: > On Monday 17 May 2004 03:53 pm, Wesley Morgan wrote: > > Has there been any discussion about integrating support for plotting > > results of queries from database backends? Like many people, I have a > > tremendous amount of data in databases but the only way to plot it in > > gnuplot is with complicated systems of pipes or exporting to text files. > > Some of us in the unix world hold the contrary view, that pipes and > text files are the easy and uncomplicated way to go. What did you > have in mind as an alternative? I'm simply thinking that I would like to be able to execute something like this... set dbserver 'localhost' set dbname 'test' set dbuser 'test' plot 'select * from table' with lines <ask for password if necessary> <plot away> Rather than have to create a data file, or pipe data from another program to gnuplot. I don't know about you but it seems a lot less complicated to me (and I hail from many years of unix, ;)). You could optionally keep the query result around until another is issued for use with replot to save some work on the backend. As you see, I'm not looking for an interface TO gnuplot, the command line works quite well for me. I'm more curious as to how difficult it would be to add this functionality to gnuplot itself. It already supports a tremendous range of output formats, so why not accept a few more input methods? Adding support for a few db backends would surely be very similar (if not easier) than reading data files. > > What kind of function 'hooks' would need to be provided to the plotting > > routines to accomplish this? > > There are interfaces to gnuplot through > java: > http://www.is.informatik.uni-duisburg.de/projects/java-unidu/api/de/unidu/is/gnuplot/Gnuplot.html > perl: > http://search.cpan.org/~ilyaz/Term-Gnuplot-0.5704/Gnuplot.pm > python: > http://gnuplot-py.sourceforge.net/ -- Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! |