From: Patrick Jacquot <patrick.jacquot@anpe.fr>
To: Parang Saraf <parang.saraf@gmail.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: graph plottin engines compatible with postgres
Date: Mon, 03 Jul 2006 12:31:23 +0200
Message-ID: <44A8F1FB.1040707@anpe.fr> (raw)
In-Reply-To: <46ed1b650606271310t9d413ady2774723693a80df6@mail.gmail.com>
References: <46ed1b650606271310t9d413ady2774723693a80df6@mail.gmail.com>
Parang Saraf wrote:
> hey,
>
> I wanted to know about graph plotting engine that is compatible with
> postgres 8.1.4. I am performing some queries like :
> Comparing the speed of three runners namely A, B and C versus time. I
> want to publish the result in a graphical manner on the net instead of
> just providing the data.
>
> So, if you could provide me with some information on how i can do it
> then that would be great.
>
> thanks and regards
> parang saraf
> parang.saraf@gmail.com <mailto:parang.saraf@gmail.com>
I use gnuplot to do that kind of stuff since 1997.
Example for two curves on the same graph :
LANG=fr
LINGUAS=fr
psql editor <<finpsql
set DateStyle ='European';
\t
\o |sed 's/|/ /g' - > plotdata
select distinct d, totblo, utiblo from area where tp='$1' and area =
'EDDON01' and d > 'today'::date-365 order by d;
\o
\q
finpsql
gnuplot <<fingnuplot
set grid
set xdata time
set xtics rotate
set timefmt "%d-%m-%Y"
set data style lines
set ylabel "Blocs"
set format y '%7.0f'
set terminal postscript
set output "|lpr"
set key below
set title "Area EDDON01 machine $1 le `date +'%A %d %B %Y'`"
plot "plotdata" u 1:3 title "Occupation de l'area", "" u 1:2 title
"Taille de l'area"
fingnuplot
This example uses a temporary "plotdata" file.
HTH
--
Patrick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: patrick.jacquot@anpe.fr, parang.saraf@gmail.com
Subject: Re: graph plottin engines compatible with postgres
In-Reply-To: <44A8F1FB.1040707@anpe.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox