You are not logged in.

#1 2013-10-27 10:32:16

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

[SOLVED] [gnuplot] - creating a minutes/month plot from date values

hi, i am having a hard time with gnuplot. basically i want an axis "year-month" and an axis "minutes". where minutes is the amount of minutes for each month.
this is the format i have (each line represents one minute)

2013-09-27T04:49+0100
2013-09-27T04:50+0100
2013-09-27T05:01+0100
2013-10-27T05:02+0100
2013-10-27T05:02+0100
2013-10-27T05:03+0100
2013-10-27T05:03+0100
2013-10-27T05:04+0100
2013-10-27T05:04+0100
2013-10-27T05:05+0100
2013-10-27T05:05+0100
2013-10-27T05:06+0100
2013-10-27T05:07+0100
2013-10-27T05:09+0100
2013-10-27T05:10+0100 

But I have no clue where to go from here...

Last edited by Rasi (2013-10-27 13:42:40)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#2 2013-10-27 10:59:05

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] [gnuplot] - creating a minutes/month plot from date values

Start with the gnuplot documentation. You have to learn the syntax. You will also need a scripting language, that can form your data into gnuplot syntax like awk, perl, python or even bash. Here are some example gnuplot scripts. You should also post the skelleton of your script, so we know, what you already have, otherwise it's hard to tell you anything other than RTFM.

Offline

#3 2013-10-27 12:13:46

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] [gnuplot] - creating a minutes/month plot from date values

ok, i am nearly done. i changed my output format to

201310 12

where the 2nd column is the minutes for each month

this is my plotting script:

set terminal svg size 900, 300
set output "kacklog.svg"
set xdata time
set timefmt "%Y%m%d"
set autoscale y
set xtics format "%b %d"
plot [:][:] 'kotlog' using 1:2 title "foo" with lines

only question remaing is: how can i set the X axis to show months instead of days and how can i make the y axis use a scale from 0 to 1000 in steps  of 100?


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#4 2013-10-27 13:42:25

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] [gnuplot] - creating a minutes/month plot from date values

solved it...

set terminal png size 900, 300
set output "foo.png"
set style data histogram
set style histogram cluster gap 1
set style fill solid border -1
set boxwidth 0.8
#set xtic rotate by 90 scale 0
unset ytics
set y2tics
set size 1.0
set label 1 'Kack-Monat' at graph 0.5, 0.9 centre
set label 2 'Kack-Minuten' at graph 0.02, 0.25 left rotate by 90
p 'foobar' u 2 title '', '' u 0:(2):xticlabel(1) w l title '' 

He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

Board footer

Powered by FluxBB