how could I replace gnuplot output to image (keep it open in its own window) output from inside PSQL ?
So I would like to output that on graphical graphic to make it more readable by my users,
I mean when they start the script they get a popup Xorg window with the graph until they close themselves that window.
currently, I use this kind of test :
francois@zaphod:~/Documents/DEV/sh/pgsqlplot$ cat commands
\t
\a
\f ' '
\o | /usr/bin/gnuplot
select 'set title "My test Graph"; set terminal dumb 128 52; set key off; set ylabel "something"; set xlabel "temp";' || 'plot ''-'' with lines;' ;
select something from temp where date >= '2018-01-01' order by date ;
\o
francois@zaphod:~/Documents/DEV/sh/pgsqlplot$ psql perso < commands
So I cat get a terminal pseudo graph like that :
3000 +-+--------------------+-----------------------+----------------------+-----------------------+--------------------+-+
+ + + + + +
| * |
| ** |
| * * |
| * * |
| * * |
2500 +-+ * * * +-+
[...etc...]
I did not find the good help pages neither in gnuplot neither in gluplot documents. Could you help me to adapt the commands file to use proper options around gnuplot & postgres ?
I tried to use set terminal jpeg large font arial size 2048,768 & \o | /usr/bin/gnuplot --persist but then I get the jpeg binary content on the terminal then