Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. #!/usr/bin/gnuplot
  2. # Output format
  3. set terminal png enhanced font "freesans,16" linewidth 2
  4.  
  5. # Caption
  6. set key inside top horizontal nobox font ",12"
  7.  
  8. set xlabel ''
  9. set ylabel ''
  10. set auto x
  11. set xtics rotate by -30 offset -1
  12.  
  13. set style data histogram
  14. set style fill solid border -1
  15. set style histogram errorbars gap 1 lw 1
  16.  
  17. set datafile separator ";"
  18. set yrange [0.4:1.4]
  19.  
  20. set style line 1 lt 2
  21. set style line 2 lt 3
  22. set style line 3 lt 4
  23.  
  24. # Compute error of a/b
  25. # 1. compute relative errors
  26. # 2. add them together
  27. # 3. convert the result back to absolute (multiply by a/b)
  28. error(a,aerr,b,berr) = ((aerr/a) + (berr/b)) * (a/b)
  29.  
  30. set title 'Title'
  31. set output 'output.png'
  32. # Note: 'every ::3' starts counting from row 3 onwards, when there is more than
  33. # one heading row
  34. plot 'input.dat' every ::3 using ($2/$3):(error($2,$6,$3,$7)):xtic(1) ls 1 ti 'compute', \
  35. '' every ::3 using ($5/$3):(error($5,$9,$2,$7)):xtic(1) ls 2 ti 'prefetch', \
  36. '' every ::3 using ($4/$3):(error($4,$8,$2,$7)):xtic(1) ls 3 ti 'fetch'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement