Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Automating Gnuplot

94 views
Skip to first unread message

oakenshield

unread,
Oct 22, 2009, 4:31:46 AM10/22/09
to
Hello people,
I'm on a Linux box and trying to figure our how to (some sort of )
automate gnuplot on a data file gathered by some bash scripts in the
format: "Y/m/d" "some number"
e.g.
Date Number
1999/01/01 5
1999/01/02 10
... ...
1999/02/01 0
... ...
2009/09/30 32


I fully understand to plot all of the data. Such as:

set xdata time
set timefmt "%Y/%m/%d"
set format x "%b %d"
set xlabel "Date"
set ylabel "Frequency"
set grid
set xrange ["1999/01/01":"2009/09/30"]
set terminal png
set title "Overall"
set nokey
set output "overall.png"
plot "frequencies.txt" using 1:2 with boxes


Bu i want to automate plotting procedure in a monthly basis such that,
for example, for a particular i can get 12 graphs of this particular
year with correct titles like "January 1999" or simply "January". Is
there anyone to help me?

Thanks in advance.

oakenshield

unread,
Oct 22, 2009, 4:35:17 AM10/22/09
to


Sorry for typos. For the very first paragraph, i 'd mean "figure
out" , and in the last paragraph it should be "for a particular
year"...

oakenshield

unread,
Oct 22, 2009, 4:35:30 AM10/22/09
to
On Oct 22, 11:31 am, oakenshield <oakenshield.tho...@gmail.com> wrote:

geep

unread,
Oct 22, 2009, 5:11:37 AM10/22/09
to

Hi,
I achieve gnuplot automation using Perl.
I use Perl scripts to generate a gnuplot command file,
and then call gnuplot from within Perl to use that command file.

Could also use bash scripts, but for handling time/date I prefer Perl.

Good luck,
Peter

oakenshield

unread,
Oct 22, 2009, 6:23:49 AM10/22/09
to
> Hi,
> I achieve gnuplot automation using Perl.
> I use Perl scripts to generate a gnuplot command file,
> and then call gnuplot from within Perl to use that command file.
>
> Could also use bash scripts, but for handling time/date I prefer Perl.
>
> Good luck,
> Peter

Hi, thanks for the reply. I've achieved my goal through a bash script.
The following URL gave some clues about how to handle such conditions.

http://ac12.wordpress.com/2007/03/26/automation-for-the-win/

News free.fr

unread,
Oct 28, 2009, 7:38:02 PM10/28/09
to oakenshield
Why don't you simply call gnuplot from your crontab.
If I understood your problem, you wanna call gnuplot every x days (or
hours or whatever time you like).

In that case, the good old crontab is the perfect tool.
Do a man cron and man crontab for all the details but, quickly, it's the
basic Unix programm that helps you launching shell script or command at
predefined time on a regular basis.

Therefore, if you wanna generate your charts every month with gnuplot,
cron will call it for you.

Cheers,
David

News free.fr

unread,
Oct 28, 2009, 7:38:34 PM10/28/09
to oakenshield
Why don't you simply call gnuplot from your crontab.
If I understood your problem, you wanna call gnuplot every x days (or
hours or whatever time you like).

In that case, the good old crontab is the perfect tool.
Do a man cron and man crontab for all the details but, quickly, it's the
basic Unix programm that helps you launching shell script or command at
predefined time on a regular basis.

Therefore, if you wanna generate your charts every month with gnuplot,
cron will call it for you.

Cheers,
David

>> Hi,

0 new messages