#1276 x11 terminal wrong cursor position display


I noticed the cursor position display for the x11 terminal displaying x values with an offset for certain data sets. So far I have seen addition or subtraction of 10 or 100 to the real value. See attached example script (plot with x11 terminal to see the bug, with qt to see the correct display) and screenshot (notice the obviously wrong x that is outside the plotted region). I observed this on Linux/x86-64 with 4.6.0 and the CVS version and also with 4.4 on Solaris 10/x86.

1 Attachments


  • Thomas Orgis

    Thomas Orgis - 2013-08-22

    added the screenshot

  • Ethan Merritt

    Ethan Merritt - 2013-08-23

    I can't reproduce this, and don't recall any similar reports.

    What is the problem are you having with "set term wxt persist"?
    I don't seem to find a relevant bug report.

  • Thomas Orgis

    Thomas Orgis - 2013-08-24

    I checked again on another install, to make sure it is not my window manager or the custom Linux distro. Attached new screenshot is from within ubuntu 12.04 LTS on x86-64, running unity GUI. What's your setup?

    Regarding wxt: I remember discussing troubles I have with it and my frontend script, which calls gnuplot in a pipe. The Wx terminal didn't like persist with the pipe. The discussion may have been in IRC. I remember digging around a bit even ... faintly ... but ultimately, the Wx terminal does not matter much to me. I spawn lots of windows quickly and the x11 terminal is several times as fast to open a window. Anyhow, the issue is that

    sh$ echo 'set term wxt; plot x' | gnuplot -persist | cat

    blocks the terminal (does not close stdout) while

    sh$ echo 'set term x11; plot x' | gnuplot -persist | cat

    returns immediately. My frontend script waits for gnuplot main proces to end / close the pipe.

    Last edit: Thomas Orgis 2013-08-24
  • Ethan Merritt

    Ethan Merritt - 2013-08-24

    Ah. Thanks for the screenshot.
    I didn't catch at first that this bug only triggers in -persist mode, after the main program has exited. In that situation the mouse tracking is handed off to gnuplot_x11, whereas it was handled by gnuplot itself while it was still running. So the bug is either in gnuplot_x11 or in the axis scaling information that was passed to it before gnuplot exited.

    As to wxt,
    echo 'set term wxt; plot x' | gnuplot -persist | cat
    is non-blocking when I test it here on both 4.6.3 and current cvs. This problem was present in versions through 4.6.0 but was fixed in 4.6.1 according to ChangeLog.

  • Thomas Orgis

    Thomas Orgis - 2013-08-24

    I'm relieved I'm not the only one who sees the index shift. I have to emphasize that it only happens with a certain data set size and range therein, but since it is quickly reproducable now, I hope it can be handled without too much headache.

    Regarding wxt: Zut alors! You're right. Since I upgraded gnuplot on my work machine for testing the x11 bug with the freshest version, my frontend now works properly with Wx terminal! It's still a bit strange that I have to first trigger some action (click button or change range) to make the display react to cursor movements, but it works. Perhaps I'll now use it in cases where I want to work interactively with a single plot (and not just look at 10 of them).

  • Thomas Orgis

    Thomas Orgis - 2013-08-24

    Wait, it was even my patch that fixed the wxt issue? Damn, I knew hacked on this some time ago;-) A bit worrying though, that I managed to half-forget about it among my other RL troubles ...

    (And bug 3309277 is called whatever now, after the sf.net changes ...)

    (Ha, there it is: bug 995 now; seems like your memory is also getting a bit unreliable, Ethan;-)

    Last edit: Thomas Orgis 2013-08-24
  • Ethan Merritt

    Ethan Merritt - 2013-08-24

    I was only looking through open bugs, not ones that were already closed+fixed.

    Anyhow, the current x11 issue is a trivial fix. The axis mapping info passed to gnuplot_x11 used format %14.3g but 3 decimal places are not enough here. Changed to %16.6g in CVS for 4.6 and 4.7.

  • Ethan Merritt

    Ethan Merritt - 2013-08-24
    • status: open --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks