Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I have data file with +20k entries, so I just pick the latest 288 (one day data) with tail, then remove date from my lines and then have prepared file for ploting.
- this is how big data file looks like:
- 2013-02-13 01:00:03 , 0.062
- 2013-02-13 01:05:02 , 0.125
- 2013-02-13 01:10:02 , 0.25
- 2013-02-13 01:15:02 , 0.312
- 2013-02-13 01:20:02 , 0.312
- tail big_data_file.csv -n 288 | awk '{ print $NF }'>> data24h.csv
- that gives me just last values in data24h.csv file:
- 0.062
- -0.062
- -0.125
- 0.062
- 0.125
- 0.25
- 0.312
- 0.312
- plot with:
- ./plot.pg > anyname.png
- my plot.pg file:
- #!/usr/bin/gnuplot
- reset
- set terminal png size 500,500
- set style data lines
- set key reverse Left outside
- set grid
- set style line 1 lt 1 lw 3 pt 0.1 linecolor rgb "blue"
- set object 1 rectangle from graph 0,0 to graph 1,1 behind fc rgbcolor "#00000f" lw 0
- set pointsize .5
- plot "data" using 0:1 title "Temp in C"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement