improved plotting stuff
This commit is contained in:
parent
a324a3217c
commit
ac443230d2
20
plot.rb
20
plot.rb
|
@ -1,17 +1,29 @@
|
||||||
users = ["christoffermadsen","jmaa","jacob","alexander"]
|
users = ["christoffermadsen","jmaa","jacob","alexander"]
|
||||||
log_dir = "./log/"
|
log_dir = "./log/"
|
||||||
plotstring = %Q[set terminal 'png'
|
plotstring = %Q[set terminal 'png' size 1000,400
|
||||||
set output "/home/christoffermadsen/public_html/img/screenshot_count.png"
|
set output "/home/christoffermadsen/public_html/img/screenshot_count.png"
|
||||||
set title "Screenshot Count"
|
set title "Screenshot count"
|
||||||
set key left box
|
set key bottom outside
|
||||||
|
|
||||||
|
set style line 1 lt 1 lw 2 pt 7 ps 0.4
|
||||||
|
|
||||||
set xdata time
|
set xdata time
|
||||||
set timefmt "%s"
|
set timefmt "%s"
|
||||||
set format x "%m/%d"
|
set format x "%m/%d"
|
||||||
set yrange [0:500]
|
set yrange [0:500]
|
||||||
|
set xlabel "Time"
|
||||||
|
set ylabel "Count"
|
||||||
|
set ytics 100
|
||||||
|
set mytics 2
|
||||||
|
set grid ytics mytics xtics
|
||||||
|
set grid
|
||||||
|
set xtics 432000
|
||||||
|
|
||||||
plot ]
|
plot ]
|
||||||
|
|
||||||
users.each do |user|
|
users.each do |user|
|
||||||
plotstring += %Q["log/#{user}.log" using 1:2 with lines, \\\n]
|
colour = "%06x" % (rand * 0xffffff)
|
||||||
|
plotstring += %Q["log/#{user}.log" using 1:2 with lines ls 1 lc rgb '##{colour}' t "#{user}", \\\n]
|
||||||
end
|
end
|
||||||
output = File.open("plotscript","w")
|
output = File.open("plotscript","w")
|
||||||
output << plotstring
|
output << plotstring
|
||||||
|
|
Loading…
Reference in New Issue
Block a user