Given the following data in p1-5-hist.dat 22.5 5 5 27.5 13 5 32.5 17 5 37.5 8 5 60 12 40 And the gnuplot file: set xrange [15:85] set xtics 5 set data style boxes plot "p1-5-hist.dat" the gnuplot shipped with Red Hat Linux 7.0 produces the wrong graph: http://www.cs.princeton.edu/~wtcorrea/gnuplot-wrong.jpg The gnuplot available as a tarball from ftp://ftp.dartmouth.edu/pub/gnuplot/gnuplot-3.7.tar.gz produces the right graph: http://www.cs.princeton.edu/~wtcorrea/gnuplot-right.jpg
I found the bug. There is a missing break statement in plot2d.c, line 328. *** plot2d.c Mon May 28 14:51:30 2001 --- plot2d.c.orig Mon May 28 14:51:20 2001 *************** *** 325,331 **** case BOXES: min_cols = 2; max_cols = 4; ! break; default: min_cols = 1; max_cols = 2; --- 325,331 ---- case BOXES: min_cols = 2; max_cols = 4; ! default: min_cols = 1; max_cols = 2;
The problem also happens with the gnuplot shipped with Red Hat Linux 7.1. ps: I've changed the summary to better explain what the problem was, and I've included Jakub in the cc list.
New location of the images: http://www.cs.princeton.edu/~wtcorrea/misc/gnuplot-wrong.jpg http://www.cs.princeton.edu/~wtcorrea/misc/gnuplot-right.jpg
fixed in 3.7.1-15 - thanks!