Menu

#1258 Wrong key color for columnstacked histogram

closed-out-of-date
nobody
None
5
2015-03-23
2013-07-03
No

Minified code sample which produces problem:

reset
unset output
set terminal wxt
set style histogram columnstacked
set style data histogram
plot "deletions.stat" using 2:key(1) title columnhead , "" using 3 title columnhead

deletions.stat:
Number One Two
Stack1 2 4
Stack2 3 6

What I get is:
http://snag.gy/0mGqz.jpg

However, the key for Stack1 should be green - not red.

Is this intended? Am I missing something? Is it a bug?

Note: Leaving out ":key(1)" solves this problem as the key is not shown any more. Another solution is leaving out both instances of "to col", but I need them there.

Discussion

  • NotDifficult

    NotDifficult - 2013-07-03
    • summary: Wrong key color for columnstacked plots --> Wrong key color for columnstacked histogram
     
  • NotDifficult

    NotDifficult - 2013-07-03

    Note: Using "set key autotitle columnheader" instead of "title columnhead" does not help, either.

     
  • NotDifficult

    NotDifficult - 2013-07-03

    Sorry, I did not realize that I was running old version 4.6.0. With 4.6.3 the example works fine. However, leaving out "title column" and not having "set key autotitle columnheader" still produces wrong colors.

     
  • NotDifficult

    NotDifficult - 2013-07-03

    Another (probably strongly connected!?) problem:

    add "set style fill pattern"

    The patterns are also off by one even with version 4.6.3

     
  • NotDifficult

    NotDifficult - 2013-07-03

    Complete example showing weird behaviour:

    reset
    unset output
    set terminal wxt

    set style histogram columnstacked
    set style data histogram

    set style fill pattern

    plot "deletions.stat" using 3:key(1) , "" using 4:key(1) ti col , "" using 5:key(1)

    deletions.stat
    Number DUMMY Two Three
    Stack1 0 2 4 5
    Stack2 0 3 6 1

    Output: http://snag.gy/gxLip.jpg

     

    Last edit: NotDifficult 2013-07-03
  • Ethan Merritt

    Ethan Merritt - 2013-07-03

    Thank you for the bug report.

    The primary bug was fixed in CVS several months ago. The current development version (4.7) handles the sequence of pattern fills correctly, and the fix will be in the next release 4.6.4.

    The "weird behaviour" is a result of failing to set "set key autotitle columnhead". In the absence of this command the first line of the input file is interpreted as data, rather than as titles, which causes the count of data entries to be off by one. Arguably there should be some other way for the program to know that the first input line is not actually data, but for now the autotitle command is required.

     
  • Ethan Merritt

    Ethan Merritt - 2013-07-03
    • status: open --> closed-out-of-date
     
  • NotDifficult

    NotDifficult - 2013-07-04

    Could you please provide a testing binary of the current development version for Windows?
    http://www.gnuplot.info/development/binaries/gp470-20130425-win32-mingw.exe does not yet fix the problem. Thanks!

     
    • Bastian Märkisch

      An updated testing binary is now available.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.