Bug 21341

Summary: gnuplot plots boxes with wrong widths
Product: [Retired] Red Hat Linux Reporter: Wagner T. Correa <wtcorrea>
Component: gnuplotAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: jakub, rvokal, wtcorrea
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-06-03 07:17:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Wagner T. Correa 2000-11-26 03:37:19 UTC
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

Comment 1 Wagner T. Correa 2001-05-28 18:56:32 UTC
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;


Comment 2 Wagner T. Correa 2001-06-03 05:32:53 UTC
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.

Comment 4 Bill Nottingham 2002-01-23 06:55:55 UTC
fixed in 3.7.1-15 - thanks!