Skip to content

Instantly share code, notes, and snippets.

Created February 7, 2013 00:02
Show Gist options
  • Save anonymous/4727100 to your computer and use it in GitHub Desktop.
Save anonymous/4727100 to your computer and use it in GitHub Desktop.
#!/usr/bin/env gnuplot
set terminal svg size 800,600 # svg dumb png / mousing
# set termoption enhanced # for enchanced text mode, substituting e.g. x^2 as x squared super script
#set output "testing-gnuplot.svg"
set title "Dicks in a bag"
set macros # let's you expand variables with @ during preprocessing
# set size ratio 0.5
set grid # mxtics mytics
#set time bottom
set timestamp "Generated on %Y-%m-%d by `whoami`" font "Helvetica-Oblique, 8pt"
set noclip
set xrange [0:100]
# set xdata time
# set ydata time
# set timefmt "%s"
# set format x "%b/%a"
dividing_line = 155
set key reverse left Left # box
set label "(* dong)" at 50,160 right textcolor lt 5
set ylabel "Number of bags" textcolor lt 3
set yrange [0:250]
set mytics 5
set y2tics
set xlabel "Number of dicks" textcolor lt 4
set mxtics 5
set format y "%g GD"
set label "GD = GigaDicks" at -15, -30 font "Arial-Oblique,10pt"
# set logscale x
# set xtics ("April" 1, "May" 2, "June" 3, "July" 4)
# set format x "%10.3f"
# set format x "%g gigabytes"
# set format x "" <--- this removes the x numbers entirely
set boxwidth 0.5
set style fill transparent pattern 4 bo
plot dividing_line title "High water mark", \
"bigdata" title "@noradio" smooth csplines with lines, \
"< awk '{print $1, $2+$2*0.75}' bigdata2" title "@a_a" smooth bezier with linespoints, \
"tableformat" using 1:($2-$3+$4) title "@garru" smooth bezier with lines lc rgb "brown", \
"bigdata2" title "@evanm" smooth kdensity with boxes fillstyle solid 0.30 noborder lc rgb "gold"
# "bigdata2" title "@garru" with boxes fillstyle pattern 2
#save file
# 'with' can be 'lines', 'dots',
# 'points', 'linespoints', 'impulses', 'boxes'
# 'yerrorbars', 'xerrorbars', 'xyerrorbars'
# nice colors: slategray light-pink light-goldenrod light-green light-red light-coral plum
# maybe nice colors: dark-orange web-green orange-red khaki seagreen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment