Skip to content

Instantly share code, notes, and snippets.

@zolotyh
Created May 30, 2018 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zolotyh/6d343af49acfe31eebfb88858ecb14ac to your computer and use it in GitHub Desktop.
Save zolotyh/6d343af49acfe31eebfb88858ecb14ac to your computer and use it in GitHub Desktop.
Draw graphics
#!/usr/bin/env bash
# draw image and open chart for memory real
# and virtual usage
set e
FILE=measures.csv;
SCALE=1048576
gnuplot <<- EOF
set parametric
set xlabel "Time"
set terminal png size 1280,800
set ylabel "Memory (gb)"
set title "Memory usage"
set datafile separator ","
set y2tics 1
set ytics 1
set my2tics 10
set mytics 10
set term png
set ytics nomirror
set output "${FILE}.png
const=3
set grid ytics mytics
set key autotitle columnhead
plot '${FILE}' using 1:(\$2/$SCALE) with line, '${FILE}' using 1:(\$3/$SCALE) with line,'${FILE}' using 1:(\$4/100) with line
EOF
open "${FILE}.png"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment