On 17.05.2013 04:15, Beery wrote:
> Not sure if this is the right group...
Probably not. :-)
And I see you already multi-posted the same questions to the gnuplot group.
Every other year when I'm doing some graphs with gnuplot I have to study
that tool again; so I can only provide some example that may or may not help
you, and you certainly have to map relevant information to your problem.
>
> I have a data file of the following format:
>
> servername,2013-05-11 17:46:03,SomeText,195,195,11,202
> servername,2013-05-11 17:47:03,SomeText,192,192,23,103
> servername,2013-05-11 17:48:03,SomeText,189,190,14,117
> servername,2013-05-11 17:49:03,SomeText,196,195,24,231
> ...
> ...
>
> I want to plot a graph where the x-axis has the time (%H:%M:%S) values (don't need the date part. The y-axis should have the two last columns.
I had been plotting weather data, temperature and rain also on two axis; I
assume by "two columns" you mean something like that.
Here is my data format (separated in two files in my case):
==> temp.plot <==
10.03.2012 05:00 0�C
10.03.2012 08:00 4�C
==> rain.plot <==
10.03.2012 05:00 0.01
10.03.2012 08:00 0.01
And the gnuplot script:
set title "...\n\n"
set locale "de_DE.utf8"
set decimalsign '.'
set xdata time
set timefmt "%d.%m.%Y"
set format x "%a.\n%d."
set timefmt "%d.%m.%Y %H:%M"
set xlabel "Datum"
set ylabel "Temperatur [�C]"
set y2label "Niederschlag [mm]"
set yr [-20:+60+-20]
set y2r [0:12]
set xtics 86400
set mxtics 8
set ytics 10
set mytics 2
set y2tics 1
set my2tics 10
set xtics offset first 86400/2
set ytics nomirror
set grid
set xzeroaxis ls 4
set term png size 800+12, 600
set output "wetter_tmp.png"
plot "temp.plot" using 1:3 title 'Temperatur' smooth csplines, \
"rain.plot" using 1:3 axis x1y2 title 'Niederschlag' smooth csplines lt 3
It creates output with two different scales on the left and right side, for
temperature and rain respectively. From the two time information data columns
the script is creating just the "Day of the week" name and the "Day in month"
number.
Hope it's of some use.
One more thing; if it's the two different delimiters (comma and blank) that
is the problem in your script you may want to pre-process that data first.
Janis