Menu

#1167 Problem with `newhistogram` in 4.6.0

closed-fixed
nobody
2D plot (258)
5
2015-03-23
2012-09-11
No

Today, when answering a question on StackOverflow, it appears that we ran into a bug. The corresponding link is http://stackoverflow.com/questions/12368906/gnuplot-not-showing-the-rowstacked-histogram-properly/12370112#12370112 . The problem is that in gnuplot 4.6.0, the histograms for the 3rd and 4th newhistogram commands begin to "float" (gnuplot 4.4.2 works OK). Here's a reasonably small script which demonstrates the problem (Problem was reproduced on my MacBookPro running OS X, 10.5):

datafile: plot1.txt:
-----------------------------

Threads "Overhead 1" "Overhead 2" "Overhead 3"
w1 6 47 58 8 0 0 15 4 45 12 5 5
w2 4 6 6 5 0 2 1 3 2 10 20 30

gnuplot script to plot it:
-----------------------------

set output "foo.ps"
set term postscript color
set style data histogram
set style histogram rowstack gap 1
set style fill solid border -1

plot newhistogram "bm1" lt 2, 'plot1.txt' u 2:xtic(1) title columnhead(2), '' u 3 title columnhead(3), '' u 4 title columnhead(4), \ newhistogram "bm2" lt 2, 'plot1.txt' u 5:xtic(1) notitle, '' u 6 notitle, '' u 7 notitle, \ newhistogram "bm3" lt 2, 'plot1.txt' u 8:xtic(1) notitle, '' u 9 notitle, '' u 10 notitle, \ newhistogram "bm4" lt 2, 'plot1.txt' u 11:xtic(1) notitle, '' u 12 notitle, '' u 13 notitle

Discussion

  • Ethan Merritt

    Ethan Merritt - 2012-09-11

    Thank you for the bug report and test case.
    Valgrind diagnoses this as an array overflow problem.
    I do not have a work-around to offer, but you can expect a fix to be included in version 4.6.1, which is likely to be released in the next several weeks.

     
  • Ethan Merritt

    Ethan Merritt - 2012-09-11
    • status: open --> pending-accepted
     
  • Ethan Merritt

    Ethan Merritt - 2013-04-24
    • status: pending-accepted --> closed-fixed
    • Group: --> 5.0
     

Log in to post a comment.