Today I needed to generate a simple histogram. Rather than creating a permanent script I've just been piping a string into gnuplot from echo.
echo "set terminal png;\
set output 'timings.png';\
set style fill solid 0.5 border -1;\
set xlabel 'chunks';\
set ylabel 'time to complete (m)';\
set key autotitle columnhead;\
set title 'timings on 20 nodes';\
set auto x;\
plot 'timings.tsv' u 2:xticlabels(1) with boxes lt 2;"\
| gnuplot
and out pops a nice histogram (sorry, can't post this example as it's work related).
The input file had column headers and the first column was used as the xlabels (see the xticlabels call above?)
line 0: undefined variable: columnhead
ReplyDeleteline 0: undefined function: xticlabels
[root@fstest gnuplot]# cat grphist.conf | gnuplot
line 0: undefined function: xticlabels
You are using an older version of gnuplot. You'll need version 4.2 or above for columnhead[er]. Also xticlabels appeared in version 4.1.
ReplyDelete