Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#729 xtics depending on columns

closed-out-of-date
nobody
2D plot (258)
5
2009-01-29
2009-01-29
Anonymous
No

gnuplot-file:
-------------

set border 8+1
set key below

set data style boxes
set boxwidth 0.9
set style fill solid 1.0

set xrange [-1:]
set yrange [0:]

set tics scale 0
set noytics

plot "data" using 0:3:xtic(column(2)==1 ? "1" : "2") notitle

pause -1 "Hit return to continue"

data-file:
----------

5 1 32 914 2 classe(s), 1 transition(s)
5 2 16 922 2 classe(s), 1 transition(s)
5 3 8 1544 137 classe(s), 39 transition(s)
5 4 8 888 1 classe(s), 0 transition(s)
5 5 16 903 1 classe(s), 0 transition(s)
5 6 16 1139
10 1 32 1011 2 classe(s), 1 transition(s)
10 2 16 1003 1 classe(s), 0 transition(s)
10 3 32 1080 4 classe(s), 4 transition(s)
10 4 64 1047 4 classe(s), 3 transition(s)
10 5 128 1022
10 6 128 1011 1 classe(s), 0 transition(s)
15 1 256 1182 3 classe(s), 3 transition(s)
15 2 128 1393 10 classe(s), 19 transition(s)
15 3 256 1140
15 4 128 1336 8 classe(s), 16 transition(s)
15 5 64 1139 2 classe(s), 1 transition(s)
15 6 32 1144 3 classe(s), 2 transition(s)

result:
-------

plot "data" using 0:3:xtic(column(2)==1 ? "1" : "2") notitle

always prints xtics "2" though it should print "1" sometimes.

plot "data" using 0:2:xtic(column(2)==1 ? "1" : "2") notitle

prints the correct xtics

Discussion

  • $ gnuplot

    G N U P L O T
    Version 4.2 patchlevel 2 
    last modified 31 Aug 2007
    System: Linux 2.6.26-1-686
    
    Copyright \(C\) 1986 - 1993, 1998, 2004, 2007
    Thomas Williams, Colin Kelley and many others
    
    Type \`help\` to access the on-line reference manual.
    The gnuplot FAQ is available from http://www.gnuplot.info/faq/
    
    Send bug reports and suggestions to <http://sourceforge.net/projects/gnuplot>
    
     
  • Ethan Merritt
    Ethan Merritt
    2009-01-29

    > $ gnuplot
    > G N U P L O T
    > Version 4.2 patchlevel 2

    Thanks for including the version information.
    This bug was fixed some time between 4.2.2 (Aug 2007)
    and the current released version 4.2.4 (Sep 2008).

    Your plots should be fine if you use the current version of gnuplot.

     
  • Ethan Merritt
    Ethan Merritt
    2009-01-29

    • status: open --> closed
     
  • Ethan Merritt
    Ethan Merritt
    2009-01-29

    • status: closed --> closed-out-of-date