Advertisement
Guest User

Untitled

a guest
Feb 12th, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. 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.
  2.  
  3. this is how big data file looks like:
  4.  
  5. 2013-02-13 01:00:03 , 0.062
  6. 2013-02-13 01:05:02 , 0.125
  7. 2013-02-13 01:10:02 , 0.25
  8. 2013-02-13 01:15:02 , 0.312
  9. 2013-02-13 01:20:02 , 0.312
  10.  
  11. tail big_data_file.csv -n 288 | awk '{ print $NF }'>> data24h.csv
  12.  
  13. that gives me just last values in data24h.csv file:
  14.  
  15. 0.062
  16. -0.062
  17. -0.125
  18. 0.062
  19. 0.125
  20. 0.25
  21. 0.312
  22. 0.312
  23.  
  24.  
  25. plot with:
  26. ./plot.pg > anyname.png
  27.  
  28. my plot.pg file:
  29.  
  30. #!/usr/bin/gnuplot
  31. reset
  32. set terminal png size 500,500
  33. set style data lines
  34. set key reverse Left outside
  35. set grid
  36. set style line 1 lt 1 lw 3 pt 0.1 linecolor rgb "blue"
  37. set object 1 rectangle from graph 0,0 to graph 1,1 behind fc rgbcolor "#00000f" lw 0
  38. set pointsize .5
  39. plot "data" using 0:1 title "Temp in C"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement