Menu

boxerrorbars boxwidth problem

Help
2004-05-19
2004-05-20
  • Philippe Després

    hello,
    I am trying to plot boxes with y error bar, something looking like the boxerrorbars demo of this link:
    http://www.csse.uwa.edu.au/programming/gnuplot_demos/errorbar/errorbar.html

    Unfortunately, the boxwidth seems to be impossible to change. With the 4.0 version, I got thin lines instead of boxes. Here is my script:

    set term post solid
    set out 'test.ps'
    set boxwidth -2
    set data style boxerrorbars
    plot 'data.dat' using 1:2:3:4
    !gv test.ps&

    and the data file:

    0 32.9909 5.56923 0.5
    1 32.7166 5.50846 0.5
    2 29.8714 5.44986 0.5
    3 28.9586 5.45015 0.5
    4 21.1212 5.5851 0.5
    5 9.50057 5.92878 0.5
    6 10.3279 5.6467 0.5
    7 9.75723 5.81278 0.5
    8 7.10414 5.89831 0.5
    9 0.243534 5.96102 0.5

    Am I missing something or this could be a bug?

    Thank you

    Philippe

     
    • Hans-Bernhard Broeker

      First of all, please note the context of that demo page you're quoting: that's about a (quite probably locally extended) version 3.5 of gnuplot.  That demo script is 11 years old!  It's not exactly a surprise it  doesn't quite work unmodified any more, is it?

      There is a bug involved, too, though.  Auto-computation of boxwidth is apparently broken for 'boxerrorbar'.

      As a workaround, plot the file twice, once 'with boxes', the other time 'with errorbars'.

       
    • Philippe Després

      Thank you for the quick answer. Good to know that it is a bug.

      I was aware that the page I referred to is quite old. The purpose was simply to show the kind of graph I wanted.

      Thanks again

       
      • Hans-Bernhard Broeker

        I've since fixed the program to match the documentation, and thus the old demo, too.

         

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.