Skip to content

Instantly share code, notes, and snippets.

@berlinbrown
Created July 8, 2011 01:40
Show Gist options
  • Save berlinbrown/1070929 to your computer and use it in GitHub Desktop.
Save berlinbrown/1070929 to your computer and use it in GitHub Desktop.
Basic Time Plot for GnuPlot
# Basic time plot. You have time intervals and some Y metric.
# Run with gnuplot and an image file is output.
#!/bin/sh
OUTPUT_IMG_FILE=request_log_time.png
echo "set terminal pngcairo size 1024,768
set output '${OUTPUT_IMG_FILE}'
set title 'Critical Errors By RequestTime (Past Day)'
set size 1,1
set key left top
set autoscale
set xlabel 'OccurenceIndex'
set ylabel 'RequestTimeAtError (in millis)'
set style fill pattern
set style histogram clustered
set xtic rotate by -45 scale 0.8
plot 'timeplot.dat' \\
u 3:5 t 'Beg' w impulses, \\
'' u 3:6 t 'Critical' w impulses, \\
'' u 3:7 t 'Null' w impulses, \\
'' u 3:8 t 'Excep' w impulses
" > gnuplot_tmp_cmd.tmp
gnuplot gnuplot_tmp_cmd.tmp > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment